Package VASSAL.chat.node
Class Protocol
java.lang.Object
VASSAL.chat.node.Protocol
Utility method for encoding server-related commands into strings. Messages
sent or interpreted by the server are encoded here. Messages sent from one
client to another are simply forwarded as strings without being decoded.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]static String[]decodeJoinCommand(String cmd) static String[]decodeKickCommand(String cmd) static NodedecodeListCommand(String cmd) static StringdecodeLoginCommand(String cmd) static String[]static String[]static booleanstatic PropertiesdecodeRoomsInfo(String cmd) static String[]decodeStatsCommand(String cmd) static StringencodeForwardCommand(String recipientPath, String message) Forward a message to other client nodesstatic StringencodeJoinCommand(String newParentPath) Sent when a player wishes to join a roomstatic StringencodeJoinCommand(String newParentPath, String password) Sent when a player is invited to join a locked roomstatic StringencodeKickCommand(String kickeeId) Sent by the owner of a room to kick another player back to the Main Roomstatic StringencodeListCommand(Node[] nodes) A dump of the current connections to the server.static StringencodeLoginCommand(String username) Sent when associating a connection with a given usernamestatic StringSent when the info for a particular (non-player) node is updatedstatic StringencodeRegisterCommand(String id, String initialPath, String info) Contains registration information sent when a client initially connects to the serverstatic Stringstatic StringencodeRoomsInfo(Node[] rooms) Sent when a room's info changes, or to update all rooms' info at oncestatic StringencodeStatsCommand(String info) Sent when a player updates his personal information
-
Field Details
-
REGISTER
- See Also:
-
REG_REQUEST
- See Also:
-
JOIN
- See Also:
-
FORWARD
- See Also:
-
STATS
- See Also:
-
LIST
- See Also:
-
CONTENTS
- See Also:
-
NODE_INFO
- See Also:
-
ROOM_INFO
- See Also:
-
LOGIN
- See Also:
-
KICK
- See Also:
-
-
Constructor Details
-
Protocol
public Protocol()
-
-
Method Details
-
encodeRegisterCommand
-
decodeRegisterCommand
-
encodeJoinCommand
-
encodeJoinCommand
-
decodeJoinCommand
-
encodeForwardCommand
-
decodeForwardCommand
-
encodeStatsCommand
Sent when a player updates his personal information- Parameters:
info- the encoded properties of thePlayerNodecorresponding to the player- Returns:
- See Also:
-
decodeStatsCommand
-
encodeNodeInfoCommand
-
decodeNodeInfoCommand
-
encodeRoomsInfo
-
decodeRoomsInfo
-
encodeListCommand
-
decodeListCommand
-
decodeRegisterRequest
-
encodeRegisterRequest
-
encodeLoginCommand
-
decodeLoginCommand
-
encodeKickCommand
-
decodeKickCommand
-