Player::GetNetworkPing
Defined in:
Returns the most recent ping between the local machine and the machine associated with a player.
C4Messages.h
Prototype
int32 GetNetworkPing(void) const;
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