|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.message.SOCMessage soc.message.SOCServerPing
public class SOCServerPing
This is a ping message from the server, or its reply from the client.
In version 1.1.08 and higher, the client echoes the ping back to the server. Server can use this to ensure the client is still connected. If another client attempts to connect with the same name, same host (IP address), the first client will be pinged. If the client does not respond within a minute or so, it is replaced in all games by the newly connecting client. Server attempts to send a final SERVERPING to the old client, with sleepTime -1, to let it know it's no longer connected.
Field Summary | |
---|---|
private static long |
serialVersionUID
|
(package private) int |
sleepTime
the ammount of time to sleep waiting for the next ping |
Constructor Summary | |
---|---|
SOCServerPing(int st)
Create a ServerPing message. |
Method Summary | |
---|---|
int |
getSleepTime()
|
static SOCServerPing |
parseDataStr(java.lang.String s)
Parse the command String into a ServerPing message |
java.lang.String |
toCmd()
SERVERPING sep sleepTime |
static java.lang.String |
toCmd(int st)
SERVERPING sep sleepTime |
java.lang.String |
toString()
Simple human-readable representation, used for debug purposes. |
Methods inherited from class soc.message.SOCMessage |
---|
arrayIntoStringBuf, enumIntoStringBuf, getClassNameShort, getMaximumVersion, getMinimumVersion, getType, isSingleLineAndSafe, isSingleLineAndSafe, toMsg |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
int sleepTime
Constructor Detail |
---|
public SOCServerPing(int st)
st
- the sleep timeMethod Detail |
---|
public int getSleepTime()
public java.lang.String toCmd()
toCmd
in class SOCMessage
public static java.lang.String toCmd(int st)
st
- the sleep time
public static SOCServerPing parseDataStr(java.lang.String s)
s
- the String to parse
public java.lang.String toString()
SOCMessage
toString
in class SOCMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |