Class PacketTransportStat
- Namespace
- VpnHood.Net.PacketTransports
- Assembly
- VpnHood.Net.PacketTransports.dll
Provides the counters of a packet transport, which the transport writes.
public class PacketTransportStat
- Inheritance
-
PacketTransportStat
- Inherited Members
Remarks
The packet and byte counts are written without a memory fence, for speed: on a 32-bit platform a reader may see a torn value, and receivers on several threads may lose an increment. Drops are rare, so they are counted exactly. The times are UTC.
Properties
CreatedTime
Gets or sets when the counters were made.
public DateTime CreatedTime { get; set; }
Property Value
DroppedPackets
Gets the number of packets dropped: refused, timed out, failed, pushed out of a full queue, or left in the queue at disposal. A received packet whose handler throws is disposed without being counted.
public long DroppedPackets { get; }
Property Value
LastActivityTime
Gets the later of LastSentTime and LastReceivedTime.
public DateTime LastActivityTime { get; }
Property Value
LastReceivedTime
Gets or sets when a packet was last received; when the counters were made, until then.
public DateTime LastReceivedTime { get; set; }
Property Value
LastSentTime
Gets or sets when the last send of a batch began, whether it failed or not; when the counters were made, until then.
public DateTime LastSentTime { get; set; }
Property Value
ReceivedBytes
Gets or sets the number of bytes received, IP headers included.
public long ReceivedBytes { get; set; }
Property Value
ReceivedPackets
Gets or sets the number of packets received.
public long ReceivedPackets { get; set; }
Property Value
SentBytes
Gets or sets the number of bytes sent, IP headers included.
public long SentBytes { get; set; }
Property Value
SentPackets
Gets or sets the number of packets sent.
public long SentPackets { get; set; }
Property Value
Methods
AddDroppedPacket()
Adds one to DroppedPackets, safely from any thread.
public void AddDroppedPacket()