Network/RUdpConnection: Remove useless arg from Listen

Former-commit-id: 94af162bf5fc1e7d06baae8e4121eb5afe10a649
This commit is contained in:
Lynix 2016-04-17 17:55:21 +02:00
parent 9ea9137c21
commit 1a5dd41407
3 changed files with 6 additions and 6 deletions

View File

@ -46,8 +46,8 @@ namespace Nz
inline UInt16 GetBoundPort() const;
inline SocketError GetLastError() const;
inline bool Listen(NetProtocol protocol, UInt16 port = 64266, unsigned int queueSize = 10);
bool Listen(const IpAddress& address, unsigned int queueSize = 10);
inline bool Listen(NetProtocol protocol, UInt16 port = 64266);
bool Listen(const IpAddress& address);
bool PollMessage(RUdpMessage* message);

View File

@ -33,7 +33,7 @@ namespace Nz
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_Unknown, "Invalid protocol");
@ -56,7 +56,7 @@ namespace Nz
}
any.SetPort(port);
return Listen(any, queueSize);
return Listen(any);
}
inline void RUdpConnection::SetProtocolId(UInt32 protocolId)

View File

@ -63,7 +63,7 @@ namespace Nz
return Connect(hostnameAddress);
}
bool RUdpConnection::Listen(const IpAddress& address, unsigned int queueSize)
bool RUdpConnection::Listen(const IpAddress& address)
{
if (!InitSocket(address.GetProtocol()))
return false;
@ -110,7 +110,7 @@ namespace Nz
{
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)
{
DisconnectPeer(peer.index);