Description
The Ping
property of the ConnectionStats
struct provides the current network latency, measured in milliseconds, for a specific connection. This value represents the round-trip time for data packets to travel from the client to the server and back.
Usage
Use the Ping
property to monitor the latency of a network connection. This can be useful for diagnosing network issues or optimizing network performance in real-time applications.
Example
// Example of accessing the Ping property
// Assume 'connectionStats' is an instance of ConnectionStats
int currentPing = connectionStats.Ping;
// Output the current ping
// Note: Replace with appropriate logging or UI update code
// e.g., Log.Info($"Current Ping: {currentPing} ms");