Network/ENet: Refactor

This commit is contained in:
Lynix
2017-02-15 08:26:56 +01:00
parent df5d22eb30
commit 890b06bfcb
4 changed files with 40 additions and 14 deletions

View File

@@ -50,6 +50,10 @@ namespace Nz
void DisconnectNow(UInt32 data);
inline const IpAddress& GetAddress() const;
inline UInt32 GetMtu() const;
inline UInt32 GetPacketThrottleAcceleration() const;
inline UInt32 GetPacketThrottleDeceleration() const;
inline UInt32 GetPacketThrottleInterval() const;
inline UInt16 GetPeerId() const;
inline ENetPeerState GetState() const;

View File

@@ -13,6 +13,26 @@ namespace Nz
return m_address;
}
inline UInt32 ENetPeer::GetMtu() const
{
return m_mtu;
}
inline UInt32 ENetPeer::GetPacketThrottleAcceleration() const
{
return m_packetThrottleAcceleration;
}
inline UInt32 ENetPeer::GetPacketThrottleDeceleration() const
{
return m_packetThrottleDeceleration;
}
inline UInt32 ENetPeer::GetPacketThrottleInterval() const
{
return m_packetThrottleInterval;
}
inline UInt16 ENetPeer::GetPeerId() const
{
return m_incomingPeerID;