The Latency
property of the Connection
class represents the network latency for the connection, measured in milliseconds. This property is virtual, allowing derived classes to override its behavior if necessary.
The Latency
property of the Connection
class represents the network latency for the connection, measured in milliseconds. This property is virtual, allowing derived classes to override its behavior if necessary.
Use the Latency
property to retrieve the current latency of a network connection. This can be useful for monitoring network performance and diagnosing potential issues related to network delays.
// Example of accessing the Latency property Connection connection = Connection.Find(someGuid); float currentLatency = connection.Latency; // Output the latency // Note: Avoid using Console.WriteLine in Sandbox environment Log.Info($"Current Latency: {currentLatency} ms");