com.threerings.presents.client
Interface MessageTracker


public interface MessageTracker

Used to listen to low-level message handling for the purpose of statistics tracking. Methods must be thread-safe.


Field Summary
static MessageTracker NOOP
          An implementation of the interface that does nothing.
 
Method Summary
 void messageReceived(boolean datagram, int size, DownstreamMessage msg, int missed)
          Notes that a message has been received.
 void messageSent(boolean datagram, int size, UpstreamMessage msg)
          Notes that a message has been sent.
 

Field Detail

NOOP

static final MessageTracker NOOP
An implementation of the interface that does nothing.

Method Detail

messageSent

void messageSent(boolean datagram,
                 int size,
                 UpstreamMessage msg)
Notes that a message has been sent.


messageReceived

void messageReceived(boolean datagram,
                     int size,
                     DownstreamMessage msg,
                     int missed)
Notes that a message has been received.

Parameters:
msg - the received message, or null if received out of order.
missed - the number of messages missed between this message and the one before it.