Class ConnectionStatistics
- Namespace
- BSGameLib.Networking
- Assembly
- BSGameLib.Networking.dll
One connection's traffic and round-trip time, as its transport measured them.
public sealed record ConnectionStatistics : IEquatable<ConnectionStatistics>
- Inheritance
-
ConnectionStatistics
- Implements
- Inherited Members
Constructors
ConnectionStatistics(long, string, int, long, long, TimeSpan?)
One connection's traffic and round-trip time, as its transport measured them.
public ConnectionStatistics(long RemoteId, string IpAddress, int RemotePort, long BytesSent, long BytesReceived, TimeSpan? RoundTripTime)
Parameters
RemoteIdlongThe connection's RemoteId.
IpAddressstringThe peer's address, without its port.
RemotePortintThe peer's port.
BytesSentlongBytes sent to the peer since the connection opened.
BytesReceivedlongBytes received from the peer since the connection opened.
RoundTripTimeTimeSpan?The smoothed time for a message to reach the peer and come back, or null until the first one has. Measured by the transport's own pings, a few seconds apart.
Properties
BytesReceived
Bytes received from the peer since the connection opened.
public long BytesReceived { get; init; }
Property Value
BytesSent
Bytes sent to the peer since the connection opened.
public long BytesSent { get; init; }
Property Value
IpAddress
The peer's address, without its port.
public string IpAddress { get; init; }
Property Value
RemoteId
The connection's RemoteId.
public long RemoteId { get; init; }
Property Value
RemotePort
The peer's port.
public int RemotePort { get; init; }
Property Value
RoundTripTime
The smoothed time for a message to reach the peer and come back, or null until the first one has. Measured by the transport's own pings, a few seconds apart.
public TimeSpan? RoundTripTime { get; init; }