|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<PacketType>
com.camelspotting.jotl.udp.PacketType
public enum PacketType
This enum is for enumerating the different types of UDP packets that the OpenTTD server will understand and aknowledge.
RecievablePacketType
Nested Class Summary | |
---|---|
static class |
PacketType.PacketOrigin
|
Enum Constant Summary | |
---|---|
CLIENT_DETAIL_INFO
Queries a game server about details of the game, such as companies |
|
CLIENT_FIND_SERVER
Queries a game server for game information |
|
CLIENT_GET_LIST
Request for serverlist from master server |
|
CLIENT_GET_NEWGRFS
Requests the names for a list of GRFs (GRF_ID and MD5) |
|
MASTER_ACK_REGISTER
Packet indicating registration has succedeed |
|
MASTER_RESPONSE_LIST
Response from master server with server ip's + port's |
|
SERVER_DETAIL_INFO
Reply from the game server about details of the game, such as companies |
|
SERVER_NEWGRFS
Sends the list of NewGRF's requested. |
|
SERVER_REGISTER
Packet to register itself to the master server |
|
SERVER_RESPONSE
Reply of the game server with game information |
|
SERVER_UNREGISTER
Request to be removed from the server-list |
Method Summary | |
---|---|
DatagramPacket |
createPacket(InetAddress address,
int destPort)
This method constructs a DatagramPacket ready for send-off to the
OpenTTD-server. |
static PacketType |
fromInt(int value)
|
PacketType.PacketOrigin |
getPacketOrigin()
Where does this packet type come from? |
static PacketType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static PacketType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final PacketType CLIENT_FIND_SERVER
public static final PacketType SERVER_RESPONSE
public static final PacketType CLIENT_DETAIL_INFO
public static final PacketType SERVER_DETAIL_INFO
public static final PacketType SERVER_REGISTER
public static final PacketType MASTER_ACK_REGISTER
public static final PacketType CLIENT_GET_LIST
public static final PacketType MASTER_RESPONSE_LIST
public static final PacketType SERVER_UNREGISTER
public static final PacketType CLIENT_GET_NEWGRFS
public static final PacketType SERVER_NEWGRFS
Method Detail |
---|
public static PacketType[] values()
for (PacketType c : PacketType.values()) System.out.println(c);
public static PacketType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic PacketType.PacketOrigin getPacketOrigin()
public DatagramPacket createPacket(InetAddress address, int destPort)
DatagramPacket
ready for send-off to the
OpenTTD-server. NOTE: This method is not utilized in the case of the
GET_NEWGRFS-packet.
address
- where to send itdestPort
- which port to contact
DatagramPacket
public static PacketType fromInt(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |