Nazara/Network: Add GetTotalByte[Received|Sent]

This commit is contained in:
Lynix
2019-12-28 17:31:21 +01:00
parent 9f8e83087a
commit 56243f5a12
5 changed files with 23 additions and 1 deletions

View File

@@ -56,6 +56,8 @@ namespace Nz
inline UInt16 GetPeerId() const;
inline UInt32 GetRoundTripTime() const;
inline ENetPeerState GetState() const;
inline UInt64 GetTotalByteReceived() const;
inline UInt64 GetTotalByteSent() const;
inline UInt64 GetTotalPacketLost() const;
inline UInt64 GetTotalPacketSent() const;
@@ -237,6 +239,8 @@ namespace Nz
UInt32 m_timeoutMaximum;
UInt32 m_timeoutMinimum;
UInt32 m_windowSize;
UInt64 m_totalByteReceived;
UInt64 m_totalByteSent;
UInt64 m_totalPacketLost;
UInt64 m_totalPacketSent;
bool m_isSimulationEnabled;

View File

@@ -62,6 +62,16 @@ namespace Nz
return m_state;
}
inline UInt64 ENetPeer::GetTotalByteReceived() const
{
return m_totalByteReceived;
}
inline UInt64 ENetPeer::GetTotalByteSent() const
{
return m_totalByteSent;
}
inline UInt64 ENetPeer::GetTotalPacketLost() const
{
return m_totalPacketLost;