- summary: Answers the server's latency poll with the mean of the client's last 50 round-trip measurements, in milliseconds.
- area: Game.Basic
- confidence: 0.86
Answers the server's latency poll with the mean of the client's last 50 round-trip measurements, in milliseconds.
- Kind request
- Area Game.Basic
- Named by beta, gamemapping
Answers BasicLatencyStatsEvent. One integer: how long your round trips are
taking, in milliseconds.
WHEN TO SEND IT
ONCE PER POLL, IMMEDIATELY, AND FROM NOWHERE ELSE. The client builds this message in exactly one place - inside the handler for the poll - and replies unconditionally. There is no timer, no threshold and no proactive path. If you did not just receive the poll, do not send it.
REPLY ON THE SOCKET THE POLL ARRIVED ON. The client answers on the originating
connection, which only matters once you hold two at the same time (see
IdentificationRequest): the measurement buffer is shared between them, the
reply is not.
WHAT TO PUT IN IT
THE VALUE IS A MEAN, NOT A LAST READING. The client averages the round trips it
has stored - at most the last 50 - and rounds to the nearest millisecond, ties
going to the even value. It is not the most recent sample, and it is not smoothed
or weighted. Those samples come from the PingRequest / PongEvent exchange
and from nothing else.
WITH NO SAMPLES IT REPORTS 0. There is no guard for an empty buffer: a client that has never completed a ping exchange reports zero. That is faithful, but over a long session it is also a tell - real latency is never exactly and permanently zero. If you are going to answer these polls, ping often enough to have something true to say.
KEEP IT IN A PLAUSIBLE RANGE. The client casts its average through a signed 16-bit integer before writing this 32-bit field, so a value above 32767 would go out negative and one above 65535 would wrap. No real latency comes near that ceiling, which is the point: a number outside roughly 0-2000 is not something a real client can produce.
IT IS SELF-REPORTED, AND CHECKABLE. The server can compare what you claim against how long you actually took to answer this very poll.
THE TWO REPLIES TO ONE FRAME DO NOT LOOK ALIKE
This poll arrives in the same frame as SequenceNumberEvent, and the two replies
leave with different envelopes. This one travels as a correlated request: the
client allocates a uid from a counter that cycles 0-65534 and puts it on the
envelope. SequenceNumberRequest does not - it goes out with the uid set to -1.
Giving both a normal uid, or neither, is a shape no real client produces.
When you may send it
- Requires
authenticatedobserved
Related messages
- Answers
BasicLatencyStatsEvent
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | latency | int32 | The mean of the client's stored round-trip measurements. (ms) Range: 0 upward in practice; the client truncates through a signed 16-bit integer, so anything above 32767 goes out negative Averaged over at most the last 50 samples and rounded to the nearest millisecond, ties to even. Not the latest round trip. A client with no samples yet reports 0 - there is no guard for an empty buffer. | required |
Recovered with score 165, confidence 0.86, margin 165 over the runner-up. A margin close to the score means nothing else came near; a thin margin means a decoy nearly won. Members recovered: 1 of 1.
Aucun avis à afficher.