Styley stylopolis.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5252 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -26,11 +26,13 @@ import java.io.IOException;
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
|
||||
/**
|
||||
* Let's the server know we're still alive.
|
||||
*/
|
||||
public class PingRequest extends UpstreamMessage
|
||||
{
|
||||
/** 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. */
|
||||
/** 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. */
|
||||
public static final long PING_INTERVAL = 60 * 1000L;
|
||||
|
||||
/**
|
||||
@@ -50,8 +52,8 @@ public class PingRequest extends UpstreamMessage
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a timestamp that was obtained when this packet was encoded
|
||||
* by the low-level networking code.
|
||||
* Returns a timestamp that was obtained when this packet was encoded by the low-level
|
||||
* networking code.
|
||||
*/
|
||||
public long getPackStamp ()
|
||||
{
|
||||
@@ -59,8 +61,8 @@ public class PingRequest extends UpstreamMessage
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a timestamp that was obtained when this packet was decoded
|
||||
* by the low-level networking code.
|
||||
* Returns a timestamp that was obtained when this packet was decoded by the low-level
|
||||
* networking code.
|
||||
*/
|
||||
public long getUnpackStamp ()
|
||||
{
|
||||
@@ -73,8 +75,8 @@ public class PingRequest extends UpstreamMessage
|
||||
public void writeObject (ObjectOutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
// grab a timestamp noting when we were encoded into a raw buffer
|
||||
// for delivery over the network
|
||||
// grab a timestamp noting when we were encoded into a raw buffer for delivery over the
|
||||
// network
|
||||
_packStamp = System.currentTimeMillis();
|
||||
|
||||
out.defaultWriteObject();
|
||||
@@ -86,8 +88,8 @@ public class PingRequest extends UpstreamMessage
|
||||
public void readObject (ObjectInputStream in)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
// grab a timestamp noting when we were decoded from a raw buffer
|
||||
// after being received over the network
|
||||
// grab a timestamp noting when we were decoded from a raw buffer after being received over
|
||||
// the network
|
||||
_unpackStamp = System.currentTimeMillis();
|
||||
|
||||
in.defaultReadObject();
|
||||
@@ -114,9 +116,8 @@ public class PingRequest extends UpstreamMessage
|
||||
/** A time stamp obtained when we serialize this object. */
|
||||
protected transient long _packStamp;
|
||||
|
||||
/** 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). */
|
||||
/** 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). */
|
||||
protected transient long _unpackStamp;
|
||||
|
||||
/** The transport parameters. */
|
||||
|
||||
Reference in New Issue
Block a user