Network/ENet: Fix fragments and cleanup

This commit is contained in:
Lynix
2017-01-28 11:06:09 +01:00
parent 664e3a33ec
commit 8fc734674d
4 changed files with 73 additions and 61 deletions

View File

@@ -13,6 +13,21 @@ namespace Nz
return m_address;
}
inline ENetPeerState ENetPeer::GetState() const
{
return m_state;
}
inline bool ENetPeer::HasPendingCommands()
{
return m_outgoingReliableCommands.empty() && m_outgoingUnreliableCommands.empty() && m_sentReliableCommands.empty();
}
inline bool ENetPeer::IsConnected() const
{
return m_state == ENetPeerState::Connected || m_state == ENetPeerState::DisconnectLater;
}
inline void ENetPeer::ChangeState(ENetPeerState state)
{
if (state == ENetPeerState::Connected || state == ENetPeerState::DisconnectLater)