PingMessage
A static class in Root.Township, Alta.Networking.
The ping network message. The client sends a timestamp, the server echoes it back, and the client works out the round trip time.
- Listed in Networking and servers
Fields
3 private and internal fields
Properties
Methods
| Member | What it is |
|---|---|
static void Serialize(Connection connection, Stream stream) | Writes or reads the id and time. On read the server replies with the same data; the client updates LastPingInSeconds. |
static void Set(uint sendId = 0) | Fills the message with an id and the current time (low 32 bits of UTC ticks). |
static void SetElapsedTicks() | Sets LastPingInSeconds from the time since the received timestamp. |