Network/ENetPeer: Add GetPeerId()

This commit is contained in:
Jérôme Leclercq 2017-01-30 18:08:38 +01:00
parent b5797dfa12
commit 3ff483d2f6
2 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,7 @@ namespace Nz
void DisconnectNow(UInt32 data);
inline const IpAddress& GetAddress() const;
inline UInt16 GetPeerId() const;
inline ENetPeerState GetState() const;
inline bool HasPendingCommands();

View File

@ -1,4 +1,4 @@
// Copyright (C) 2017 Jérôme Leclercq
// Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
@ -13,6 +13,11 @@ namespace Nz
return m_address;
}
inline UInt16 ENetPeer::GetPeerId() const
{
return m_incomingPeerID;
}
inline ENetPeerState ENetPeer::GetState() const
{
return m_state;