Network/ENetPeer: Add total packet lost/sent counter
This commit is contained in:
parent
34828929b2
commit
4e2a037d6b
|
|
@ -205,6 +205,8 @@ namespace Nz
|
|||
UInt32 m_timeoutMaximum;
|
||||
UInt32 m_timeoutMinimum;
|
||||
UInt32 m_windowSize;
|
||||
UInt64 m_totalPacketLost;
|
||||
UInt64 m_totalPacketSent;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1320,6 +1320,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
++peer->m_packetsSent;
|
||||
++peer->m_totalPacketSent;
|
||||
++m_bufferCount;
|
||||
++m_commandCount;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@ namespace Nz
|
|||
m_incomingUnsequencedGroup = 0;
|
||||
m_outgoingUnsequencedGroup = 0;
|
||||
m_eventData = 0;
|
||||
m_totalPacketLost = 0;
|
||||
m_totalPacketSent = 0;
|
||||
m_totalWaitingData = 0;
|
||||
|
||||
m_unsequencedWindow.fill(0);
|
||||
|
|
@ -335,6 +337,7 @@ namespace Nz
|
|||
m_reliableDataInTransit -= outgoingCommand->fragmentLength;
|
||||
|
||||
++m_packetsLost;
|
||||
++m_totalPacketLost;
|
||||
|
||||
// http://lists.cubik.org/pipermail/enet-discuss/2014-May/002308.html
|
||||
outgoingCommand->roundTripTimeout = m_roundTripTime + 4 * m_roundTripTimeVariance;
|
||||
|
|
|
|||
Loading…
Reference in New Issue