|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.io.SimpleStreamableObject
com.threerings.presents.net.Message
com.threerings.presents.net.UpstreamMessage
com.threerings.presents.net.PingRequest
public class PingRequest
Let's the server know we're still alive.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected long |
_packStamp
A time stamp obtained when we serialize this object. |
protected Transport |
_transport
The transport parameters. |
protected long |
_unpackStamp
A time stamp obtained when we unserialize this object (the intent is to get a timestamp as close as possible to when the packet was received on the network). |
static long |
PING_INTERVAL
The number of milliseconds of idle upstream that are allowed to elapse before the client sends a ping message to the server to let it know that we're still alive. |
| Fields inherited from class com.threerings.presents.net.UpstreamMessage |
|---|
_nextMessageId, messageId |
| Fields inherited from class com.threerings.presents.net.Message |
|---|
received |
| Constructor Summary | |
|---|---|
PingRequest()
Zero argument constructor used when unserializing an instance. |
|
PingRequest(Transport transport)
Creates a new ping request using the specified transport. |
|
| Method Summary | |
|---|---|
long |
getPackStamp()
Returns a timestamp that was obtained when this packet was encoded by the low-level networking code. |
Transport |
getTransport()
Returns the message transport parameters. |
long |
getUnpackStamp()
Returns a timestamp that was obtained when this packet was decoded by the low-level networking code. |
void |
readObject(ObjectInputStream in)
Reads our custom streamable fields. |
void |
setTransport(Transport transport)
Sets the message transport parameters. |
String |
toString()
|
void |
writeObject(ObjectOutputStream out)
Writes our custom streamable fields. |
| Methods inherited from class com.threerings.presents.net.UpstreamMessage |
|---|
nextMessageId |
| Methods inherited from class com.threerings.presents.net.Message |
|---|
noteActualTransport |
| Methods inherited from class com.threerings.io.SimpleStreamableObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long PING_INTERVAL
protected transient long _packStamp
protected transient long _unpackStamp
protected transient Transport _transport
| Constructor Detail |
|---|
public PingRequest()
public PingRequest(Transport transport)
| Method Detail |
|---|
public long getPackStamp()
public long getUnpackStamp()
public void writeObject(ObjectOutputStream out)
throws IOException
IOException
public void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic void setTransport(Transport transport)
Message
setTransport in class Messagepublic Transport getTransport()
Message
getTransport in class Messagepublic String toString()
toString in class UpstreamMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||