float Latency { get; set; }

robot_2Generated
code_blocksInput

Description

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.

Usage

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

// 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");