Click or drag to resize

NetStatistics Class

Thread-safe counter for network statistics including sent/received packets, bytes, and packet loss.
Inheritance Hierarchy
SystemObject
  LiteNetLibNetStatistics

Namespace: LiteNetLib
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public sealed class NetStatistics

The NetStatistics type exposes the following members.

Constructors
 NameDescription
Public methodNetStatisticsInitializes a new instance of the NetStatistics class
Top
Properties
 NameDescription
Public propertyBytesReceived Total number of bytes received.
Public propertyBytesSent Total number of bytes sent.
Public propertyPacketLoss Total number of packets lost during transmission.
Public propertyPacketLossPercent Percentage of sent packets that were lost. Calculated as (PacketLoss * 100) / PacketsSent.
Public propertyPacketsReceived Total number of packets received.
Public propertyPacketsSent Total number of packets sent.
Top
Methods
 NameDescription
Public methodAddBytesReceived Adds a specific amount to the total bytes received.
Public methodAddBytesSent Adds a specific amount to the total bytes sent.
Public methodAddPacketLoss Adds a specific amount to the total packet loss count.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIncrementPacketLoss Increments the count of lost packets by one.
Public methodIncrementPacketsReceived Increments the count of received packets by one.
Public methodIncrementPacketsSent Increments the count of sent packets by one.
Public methodReset Resets all statistical counters to zero.
Public methodToString Returns a string representation of the current network statistics.
(Overrides ObjectToString)
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also