dplay_latency
This variable shows the average network latency time - the "lag" - in milliseconds. Latency is the time needed to send a message from client to server or vice versa, and receive a response.
On the same computer or over a LAN, the latency time normally is between 10 and 100 ms, while over the Internet it can be up to 500 ms.
Type:
var, read-onlyRemarks:
-
The variable is updated twice per second and displayed in the [F11] panel within the "network" column.
-
Depending on the network library, the latency is usually measured with reliable data packets, and has a meaningless value when no or only few reliable packets are sent.
-
Contrary to otherwise rumors, the engine has no influence on the speed of data packets over the Internet. Thus, complaining about bad latency on the bug forum will only bring about the advice to read the multiplayer suggestions about how to reduce the bandwidth.
Example:
PANEL* pNetstats =
{
digits ( 0, 0, 5, digit_font, 1,dplay_latency); // shows latency
digits ( 0,20, 5, digit_font, 1,dplay_bps); // shows bps average
flags = SHOW;
}
See also:
dplay_encrypt, dplay_bps, dplay_entrate, dplay_pingrate
► latest
version online