diff --git a/include/Nazara/Network/ENetPeer.hpp b/include/Nazara/Network/ENetPeer.hpp index c0d24f6f6..a6a00ba23 100644 --- a/include/Nazara/Network/ENetPeer.hpp +++ b/include/Nazara/Network/ENetPeer.hpp @@ -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(); diff --git a/include/Nazara/Network/ENetPeer.inl b/include/Nazara/Network/ENetPeer.inl index 1e74e0cae..324a1fb80 100644 --- a/include/Nazara/Network/ENetPeer.inl +++ b/include/Nazara/Network/ENetPeer.inl @@ -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;