C# Class MiniUDP.NetTraffic.PingCounter

A sliding history window of outgoing ping information and support for cross-referencing incoming pongs against that history.
Show file Open project: ashoulson/MiniUDP Class Usage Examples

Public Methods

Method Description
ConsumePong ( byte pongSeq ) : long

Returns the time the ping was created for the given pong. Checks to make sure the stored slot corresponds to the sequence.

CreatePing ( long curTime ) : byte

Creates a new outgoing ping. Stores both that ping's sequence and the time it was created.

PingCounter ( ) : System

Method Details

ConsumePong() public method

Returns the time the ping was created for the given pong. Checks to make sure the stored slot corresponds to the sequence.
public ConsumePong ( byte pongSeq ) : long
pongSeq byte
return long

CreatePing() public method

Creates a new outgoing ping. Stores both that ping's sequence and the time it was created.
public CreatePing ( long curTime ) : byte
curTime long
return byte

PingCounter() public method

public PingCounter ( ) : System
return System