courses.dsv2pvt.messageclasses
Class Ping
java.lang.Object
courses.dsv2pvt.messageclasses.Msg
courses.dsv2pvt.messageclasses.Ping
- All Implemented Interfaces:
- Serializable
- public class Ping
- extends Msg
An implementation of the server's inquiry message to determine
whether a client is connected and functioning well.
The Ping message contains the timeout before which the client
must respond in order to be disconnected.
The specification requires the client to respond to a Ping with
a Pong
, otherwise the client will be disconnected.
- See Also:
- Serialized Form
Constructor Summary |
Ping(long timeoutmillis)
Creates a ping message with the specified timeout time in
milliseconds from 1/1 1970 0:00. |
Method Summary |
long |
getTimeout()
Returns the timeout time in milliseconds from 1/1 1970 0:00. |
Ping
public Ping(long timeoutmillis)
- Creates a ping message with the specified timeout time in
milliseconds from 1/1 1970 0:00.
getTimeout
public long getTimeout()
- Returns the timeout time in milliseconds from 1/1 1970 0:00.