Network/RUdpConnection: Remove useless arg from Listen
Former-commit-id: 94af162bf5fc1e7d06baae8e4121eb5afe10a649
This commit is contained in:
parent
9ea9137c21
commit
1a5dd41407
|
|
@ -46,8 +46,8 @@ namespace Nz
|
||||||
inline UInt16 GetBoundPort() const;
|
inline UInt16 GetBoundPort() const;
|
||||||
inline SocketError GetLastError() const;
|
inline SocketError GetLastError() const;
|
||||||
|
|
||||||
inline bool Listen(NetProtocol protocol, UInt16 port = 64266, unsigned int queueSize = 10);
|
inline bool Listen(NetProtocol protocol, UInt16 port = 64266);
|
||||||
bool Listen(const IpAddress& address, unsigned int queueSize = 10);
|
bool Listen(const IpAddress& address);
|
||||||
|
|
||||||
bool PollMessage(RUdpMessage* message);
|
bool PollMessage(RUdpMessage* message);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace Nz
|
||||||
return m_lastError;
|
return m_lastError;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool RUdpConnection::Listen(NetProtocol protocol, UInt16 port, unsigned int queueSize)
|
inline bool RUdpConnection::Listen(NetProtocol protocol, UInt16 port)
|
||||||
{
|
{
|
||||||
NazaraAssert(protocol != NetProtocol_Any, "Any protocol not supported for Listen"); //< TODO
|
NazaraAssert(protocol != NetProtocol_Any, "Any protocol not supported for Listen"); //< TODO
|
||||||
NazaraAssert(protocol != NetProtocol_Unknown, "Invalid protocol");
|
NazaraAssert(protocol != NetProtocol_Unknown, "Invalid protocol");
|
||||||
|
|
@ -56,7 +56,7 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
any.SetPort(port);
|
any.SetPort(port);
|
||||||
return Listen(any, queueSize);
|
return Listen(any);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void RUdpConnection::SetProtocolId(UInt32 protocolId)
|
inline void RUdpConnection::SetProtocolId(UInt32 protocolId)
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace Nz
|
||||||
return Connect(hostnameAddress);
|
return Connect(hostnameAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RUdpConnection::Listen(const IpAddress& address, unsigned int queueSize)
|
bool RUdpConnection::Listen(const IpAddress& address)
|
||||||
{
|
{
|
||||||
if (!InitSocket(address.GetProtocol()))
|
if (!InitSocket(address.GetProtocol()))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -110,7 +110,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
PeerData& peer = m_peers[m_peerIterator];
|
PeerData& peer = m_peers[m_peerIterator];
|
||||||
|
|
||||||
UInt32 timeSinceLastPacket = m_currentTime - peer.lastPacketTime;
|
UInt32 timeSinceLastPacket = static_cast<UInt32>(m_currentTime - peer.lastPacketTime);
|
||||||
if (timeSinceLastPacket > m_timeBeforeTimeOut)
|
if (timeSinceLastPacket > m_timeBeforeTimeOut)
|
||||||
{
|
{
|
||||||
DisconnectPeer(peer.index);
|
DisconnectPeer(peer.index);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue