Class NetworkStat
Represents network session statistics including transfer rates, latency, and error counts.
public class NetworkStat
- Inheritance
-
NetworkStat
- Inherited Members
Constructors
NetworkStat()
public NetworkStat()
Properties
AverageFramerate
Gets or sets the average transfer framerate.
public double AverageFramerate { get; set; }
Property Value
Remarks
This value is meaningful for sessions with a video stream; otherwise, it is 0.
AverageJitter
Gets or sets the average transfer jitter.
public TimeSpan? AverageJitter { get; set; }
Property Value
Remarks
This value is calculated only when a video stream is present and only for the first video stream; otherwise, it is null.
AverageLatency
Gets or sets the average latency.
public TimeSpan? AverageLatency { get; set; }
Property Value
Remarks
This value is present only when the processed stream contains absolute NTP timestamps; otherwise, it is null.
AverageSendSpeed
Gets or sets the average send speed of the current session in bits per second.
public int AverageSendSpeed { get; set; }
Property Value
Remarks
Attention: This is not the average output bandwidth but the average of instantaneous socket writing speeds! In other words, this value indicates how fast the data can POTENTIALLY be sent out.
CreatedAt
Gets or sets the timestamp when the current report was created.
public DateTime CreatedAt { get; set; }
Property Value
LastActivity
Gets or sets the timestamp of the last activity from the session's remote endpoint.
public DateTime LastActivity { get; set; }
Property Value
Remarks
This includes both control protocol and media data activity.
MaxJitter
Gets or sets the maximum transfer jitter.
public TimeSpan? MaxJitter { get; set; }
Property Value
Remarks
This value is calculated only when a video stream is present and only for the first video stream; otherwise, it is null.
Ping
Gets or sets the ping time, or RTT (round trip time) to the remote endpoint, when applicable.
public TimeSpan? Ping { get; set; }
Property Value
ReceiveQueueLength
Gets or sets the receive queue length in packets.
public int ReceiveQueueLength { get; set; }
Property Value
SendQueueLength
Gets or sets the send queue length in packets.
public int SendQueueLength { get; set; }
Property Value
SendQueueSize
Gets or sets the send queue size in bytes.
public int SendQueueSize { get; set; }
Property Value
Speed
Gets or sets the current transfer speed calculated based on stream timestamps.
public double Speed { get; set; }
Property Value
Remarks
A real-time stream has a speed equal to 1.0 plus/minus jitter time. A faster-than-realtime stream has a speed higher than 1.0. A slower-than-realtime stream has a speed lower than 1.0.
Started
Gets or sets the timestamp when the session was connected.
public DateTime Started { get; set; }
Property Value
StreamErrors
Gets or sets the number of stream errors encountered by the current session.
public int StreamErrors { get; set; }
Property Value
Remarks
Only recoverable errors are counted. The actual meaning of "stream error" depends on the protocol. For example, for RTP/RTCP/RTSP, it indicates the number of lost packets.
TotalReceived
Gets or sets the total amount of data in bytes received by the current session.
public ulong TotalReceived { get; set; }
Property Value
TotalSent
Gets or sets the total amount of data in bytes sent by the current session.
public ulong TotalSent { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of the current object.
public NetworkStat Clone()
Returns
- NetworkStat
A new NetworkStat instance with the same property values.
ToString()
Returns a string representation of the network statistics.
public override string ToString()
Returns
- string
A formatted string containing the session statistics.