Initial Commit (broken due to version update)

This commit is contained in:
Reinier Vens 2020-09-25 07:12:38 +01:00
commit 3f7b3b7440
3132 changed files with 1103305 additions and 0 deletions

View file

@ -0,0 +1,36 @@
namespace LiteNetLib
{
public sealed class NetStatistics
{
public ulong PacketsSent;
public ulong PacketsReceived;
public ulong BytesSent;
public ulong BytesReceived;
public ulong PacketLoss;
public ulong PacketLossPercent
{
get
{
if (PacketsSent == 0)
{
return 0;
}
return PacketLoss * 100 / PacketsSent;
}
}
public override string ToString()
{
return
string.Format(
"BytesReceived: {0}\nPacketsReceived: {1}\nBytesSent: {2}\nPacketsSent: {3}\nPacketLoss: {4}\nPacketLossPercent: {5}\n",
BytesReceived,
PacketsReceived,
BytesSent,
PacketsSent,
PacketLoss,
PacketLossPercent);
}
}
}