Package marauroa.common.net.message
Class MessageS2CServerInfo
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageS2CServerInfo
- All Implemented Interfaces:
Serializable
The ServerInfo message is sent from server to client to inform client about
any relevant info the server has to transmit. They are in the form of
=
This message also sent to client the list of RPClass that are contained at
server at the time the message was sent.
It is because of that, that RPClass definition must be load previously to game start.
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.net.message.Message
Message.MessageType -
Field Summary
Fields inherited from class marauroa.common.net.message.Message
channel, clientid, CLIENTID_INVALID, protocolVersion, timestampMessage, type -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for allowing creation of an empty messageMessageS2CServerInfo(Channel source, String[] contents)Constructor with a TCP/IP source/destination of the message and the content. -
Method Summary
Modifier and TypeMethodDescriptionString[]This method returns the list of string that describe the servervoidSerialize the object from an ObjectInputtoString()This method returns a String that represent the objectvoidwriteObject(OutputSerializer out)Serialize the object into an ObjectOutputvoidwriteToJson(StringBuilder out)Serialize the object to jsonMethods inherited from class marauroa.common.net.message.Message
getAddress, getChannel, getClientID, getMessageTimestamp, getProtocolVersion, getType, internalToString, isPerception, isSkippable, readFromMap, requiresPerception, setChannel, setClientID, setProtocolVersion
-
Constructor Details
-
MessageS2CServerInfo
public MessageS2CServerInfo()Constructor for allowing creation of an empty message -
MessageS2CServerInfo
Constructor with a TCP/IP source/destination of the message and the content.- Parameters:
source- The TCP/IP address associated to this messagecontents- the list of strings to describe the server.
-
-
Method Details
-
getContents
This method returns the list of string that describe the server- Returns:
- the list of strings to describe the server
-
toString
This method returns a String that represent the object -
writeObject
Description copied from class:MessageSerialize the object into an ObjectOutput- Specified by:
writeObjectin interfaceSerializable- Overrides:
writeObjectin classMessage- Parameters:
out- the output serializer.- Throws:
IOException- if the serializations fails
-
readObject
Description copied from class:MessageSerialize the object from an ObjectInput- Specified by:
readObjectin interfaceSerializable- Overrides:
readObjectin classMessage- Parameters:
in- the input serializer- Throws:
IOException- if the serializations fails
-
writeToJson
Description copied from class:MessageSerialize the object to json- Overrides:
writeToJsonin classMessage- Parameters:
out- output buffer
-