|
|||||||||
| 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.DownstreamMessage
com.threerings.presents.net.PongResponse
public class PongResponse
Let's the client know the server heard its ping (and that the server and connection are still alive).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected long |
_packStamp
The timestamp obtained immediately before this packet was sent out over the network. |
protected long |
_pingStamp
The ping unpack stamp provided at construct time to this pong response; only valid on the sending process, not the receiving process. |
protected int |
_processDelay
The delay in milliseconds between the time that the ping request was read from the network and the time the pong response was written to the network. |
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). |
| Fields inherited from class com.threerings.presents.net.DownstreamMessage |
|---|
messageId |
| Fields inherited from class com.threerings.presents.net.Message |
|---|
received |
| Constructor Summary | |
|---|---|
PongResponse()
Zero argument constructor used when unserializing an instance. |
|
PongResponse(long pingStamp,
Transport transport)
Constructs a pong response which will use the supplied ping time to establish the end-to-end processing delay introduced by the server. |
|
| Method Summary | |
|---|---|
long |
getPackStamp()
Returns the time at which this packet was packed for delivery in the time frame of the server that sent the packet. |
int |
getProcessDelay()
Returns the number of milliseconds that elapsed between the time that the ping which instigated this pong was read from the network and the time that this pong was written to the network. |
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.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 |
|---|
protected transient long _pingStamp
protected long _packStamp
protected int _processDelay
protected transient long _unpackStamp
protected transient Transport _transport
| Constructor Detail |
|---|
public PongResponse()
public PongResponse(long pingStamp,
Transport transport)
| Method Detail |
|---|
public long getPackStamp()
public int getProcessDelay()
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 DownstreamMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||