C4 Engine
C4 Engine API Documentation

Player::GetNetworkPing

Defined in:  C4Messages.h
Returns the most recent ping between the local machine and the machine associated with a player.
Prototype

int32 GetNetworkPing(voidconst;

Description
The Network Manager records a ping value each time a reliable message is sent through a network connection. Calling GetNetworkPing returns the most recent ping value for a player. If messages are sent at int32 intervals, it may be desirable to send periodic messages of type PingMessage in order to maintain an up-to-date ping value.

Since client machines do not send messages directly to other clients, ping values are not available for these players and GetNetworkPing will return -1. Client machines can only retrieve the ping value between themselves and the server.
See Also

PingMessage