us.ihmc.mockets
Interface MocketStatusListener


public interface MocketStatusListener

This interface defines methods to be used by the Mocket to periodically notify the listeners about the mocket status.


Method Summary
 boolean peerReachable(long unreachabilityIntervalLength)
          Register a callback function to be invoked once peerUnreachable has been invoked and subsequently we have heard from the peer The callback will indicate the time (in milliseconds) since last contact
 boolean peerUnreachableWarning(long timeSinceLastContact)
          Function to be invoked when no data (or keepalive) has been received from the peer mocket.
 

Method Detail

peerUnreachableWarning

boolean peerUnreachableWarning(long timeSinceLastContact)
Function to be invoked when no data (or keepalive) has been received from the peer mocket. The callback will indicate the time (in milliseconds) since last contact. If the callback returns true, the mocket connection will be closed.

Parameters:
timeSinceLastContact - milliseconds from last contact.
Returns:
boolean value that will determine the behavior of the connection: close or keep going.

peerReachable

boolean peerReachable(long unreachabilityIntervalLength)
Register a callback function to be invoked once peerUnreachable has been invoked and subsequently we have heard from the peer The callback will indicate the time (in milliseconds) since last contact

Parameters:
unreachabilityIntervalLength - milliseconds after which we heard from the peer again
Returns:
bool