Nazara/Network: Add GetTotalByte[Received|Sent]
This commit is contained in:
@@ -541,6 +541,7 @@ namespace Nz
|
||||
{
|
||||
peer->m_address = m_receivedAddress;
|
||||
peer->m_incomingDataTotal += UInt32(m_receivedDataLength);
|
||||
peer->m_totalByteReceived += UInt32(m_receivedDataLength);
|
||||
}
|
||||
|
||||
auto commandError = [&]() -> bool
|
||||
|
||||
@@ -163,6 +163,8 @@ namespace Nz
|
||||
m_incomingUnsequencedGroup = 0;
|
||||
m_outgoingUnsequencedGroup = 0;
|
||||
m_eventData = 0;
|
||||
m_totalByteReceived = 0;
|
||||
m_totalByteSent = 0;
|
||||
m_totalPacketLost = 0;
|
||||
m_totalPacketSent = 0;
|
||||
m_totalWaitingData = 0;
|
||||
@@ -1085,6 +1087,7 @@ namespace Nz
|
||||
acknowledgment.sentTime = sentTime;
|
||||
|
||||
m_outgoingDataTotal += sizeof(Acknowledgement);
|
||||
m_totalByteSent += sizeof(Acknowledgement);
|
||||
|
||||
m_acknowledgements.emplace_back(acknowledgment);
|
||||
|
||||
@@ -1265,7 +1268,10 @@ namespace Nz
|
||||
|
||||
void ENetPeer::SetupOutgoingCommand(OutgoingCommand& outgoingCommand)
|
||||
{
|
||||
m_outgoingDataTotal += static_cast<UInt32>(ENetHost::GetCommandSize(outgoingCommand.command.header.command) + outgoingCommand.fragmentLength);
|
||||
UInt32 commandSize = static_cast<UInt32>(ENetHost::GetCommandSize(outgoingCommand.command.header.command) + outgoingCommand.fragmentLength);
|
||||
|
||||
m_outgoingDataTotal += commandSize;
|
||||
m_totalByteSent += commandSize;
|
||||
|
||||
if (outgoingCommand.command.header.channelID == 0xFF)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user