package mountainrangepvp.net.lanping;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* @author lachlan
*/
public class PingConstants {
public static final int CHECK_CODE = 0x01FA12D33;
public static final int VERSION = 5;
/**
* Ping rate, in Hertz
*/
public static final int PING_RATE = 1;
public static final int PING_SERVER_FRESHNESS = 10000;
public static final byte[] PING_DATA = new byte[]{
(byte) (CHECK_CODE >>> 24),
(byte) (CHECK_CODE >>> 16),
(byte) (CHECK_CODE >>> 8),
(byte) (CHECK_CODE),
(byte) (VERSION >>> 24),
(byte) (VERSION >>> 16),
(byte) (VERSION >>> 8),
(byte) (VERSION)};
public static final int MULTICAST_PORT = 5050;
public static final String MULTICAST_ADDRESS_STRING = "225.123.54.192";
public static final InetAddress MULTICAST_ADDRESS;
static {
InetAddress addr;
try {
addr = InetAddress.getByName(MULTICAST_ADDRESS_STRING);
} catch (UnknownHostException ex) {
addr = null;
}
MULTICAST_ADDRESS = addr;
}
}