Mark each upstream message with a the time at which it was decoded from
incoming network data. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2959 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UpstreamMessage.java,v 1.11 2002/12/20 23:41:26 mdb Exp $
|
// $Id: UpstreamMessage.java,v 1.12 2004/02/21 00:51:02 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.net;
|
package com.threerings.presents.net;
|
||||||
|
|
||||||
@@ -20,6 +20,9 @@ public abstract class UpstreamMessage extends SimpleStreamableObject
|
|||||||
*/
|
*/
|
||||||
public short messageId;
|
public short messageId;
|
||||||
|
|
||||||
|
/** A timestamp indicating when this upstream message was received. */
|
||||||
|
public transient long received;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Each upstream message derived class must provide a zero argument
|
* Each upstream message derived class must provide a zero argument
|
||||||
* constructor so that it can be unserialized when read from the
|
* constructor so that it can be unserialized when read from the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Connection.java,v 1.16 2003/08/20 19:32:27 mdb Exp $
|
// $Id: Connection.java,v 1.17 2004/02/21 00:51:02 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.server.net;
|
package com.threerings.presents.server.net;
|
||||||
|
|
||||||
@@ -239,6 +239,7 @@ public abstract class Connection implements NetEventHandler
|
|||||||
bytesIn = _fin.available() + 4;
|
bytesIn = _fin.available() + 4;
|
||||||
// parse the message and pass it on
|
// parse the message and pass it on
|
||||||
UpstreamMessage msg = (UpstreamMessage)_oin.readObject();
|
UpstreamMessage msg = (UpstreamMessage)_oin.readObject();
|
||||||
|
msg.received = when;
|
||||||
// Log.info("Read message " + msg + ".");
|
// Log.info("Read message " + msg + ".");
|
||||||
_handler.handleMessage(msg);
|
_handler.handleMessage(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user