Description
The OutPacketsPerSecond
property of the ConnectionStats
struct provides the rate at which packets are being sent to a specific network connection. This value is expressed in packets per second and is useful for monitoring the outgoing traffic load on a connection.
Usage
To access the OutPacketsPerSecond
property, you need an instance of the ConnectionStats
struct. This property is read-only and provides a float
value representing the number of packets sent per second.
Example
// Example of accessing the OutPacketsPerSecond property
// Assume 'connectionStats' is an instance of ConnectionStats
float packetsPerSecond = connectionStats.OutPacketsPerSecond;
// Use the value for monitoring or logging
if (packetsPerSecond > 1000)
{
// Take action if the outgoing packet rate is too high
// For example, log a warning or adjust network settings
}