1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

Fixed number of fragments statistics, fixed dropping duplicates for early received reliable unordered messages, added dropped messages statistics

This commit is contained in:
Michael Lidgren
2015-06-09 14:10:28 +02:00
parent d111197edb
commit 387f786950
7 changed files with 48 additions and 57 deletions

View File

@@ -107,32 +107,19 @@ namespace Lidgren.Network
/// </summary>
public int BytesInRecyclePool { get { return m_peer.m_storagePoolBytes; } }
#if USE_RELEASE_STATISTICS
internal void PacketSent(int numBytes, int numMessages)
{
m_sentPackets++;
m_sentBytes += numBytes;
m_sentMessages += numMessages;
}
#else
#if !USE_RELEASE_STATISTICS
[Conditional("DEBUG")]
internal void PacketSent(int numBytes, int numMessages)
{
m_sentPackets++;
m_sentBytes += numBytes;
m_sentMessages += numMessages;
}
#endif
#if USE_RELEASE_STATISTICS
internal void PacketReceived(int numBytes, int numMessages)
internal void PacketSent(int numBytes, int numMessages)
{
m_receivedPackets++;
m_receivedBytes += numBytes;
m_receivedMessages += numMessages;
m_sentPackets++;
m_sentBytes += numBytes;
m_sentMessages += numMessages;
}
#else
#if !USE_RELEASE_STATISTICS
[Conditional("DEBUG")]
#endif
internal void PacketReceived(int numBytes, int numMessages, int numFragments)
{
m_receivedPackets++;
@@ -140,7 +127,6 @@ namespace Lidgren.Network
m_receivedMessages += numMessages;
m_receivedFragments += numFragments;
}
#endif
/// <summary>
/// Returns a string that represents this object