Network: Replace unsigned int by size_t for size

Former-commit-id: efa7e2f50ae370f96871726be7906332ca8969a4
This commit is contained in:
Lynix
2016-02-04 13:27:06 +01:00
parent 33e2bb905b
commit f723d6a29c
8 changed files with 15 additions and 14 deletions

View File

@@ -224,7 +224,7 @@ namespace Nz
return code;
}
SocketState SocketImpl::Listen(SocketHandle handle, const IpAddress& address, unsigned queueSize, SocketError* error)
SocketState SocketImpl::Listen(SocketHandle handle, const IpAddress& address, unsigned int queueSize, SocketError* error)
{
NazaraAssert(handle != InvalidHandle, "Invalid handle");
NazaraAssert(address.IsValid(), "Invalid address");
@@ -254,7 +254,7 @@ namespace Nz
return SocketState_Bound;
}
unsigned int SocketImpl::QueryAvailableBytes(SocketHandle handle, SocketError* error)
std::size_t SocketImpl::QueryAvailableBytes(SocketHandle handle, SocketError* error)
{
NazaraAssert(handle != InvalidHandle, "Invalid handle");
@@ -311,7 +311,7 @@ namespace Nz
return code;
}
unsigned int SocketImpl::QueryMaxDatagramSize(SocketHandle handle, SocketError* error)
std::size_t SocketImpl::QueryMaxDatagramSize(SocketHandle handle, SocketError* error)
{
unsigned int code;
unsigned int codeLength = sizeof(code);

View File

@@ -32,12 +32,12 @@ namespace Nz
static int GetLastErrorCode();
static int GetLastErrorCode(SocketHandle handle, SocketError* error = nullptr);
static SocketState Listen(SocketHandle handle, const IpAddress& address, unsigned queueSize, SocketError* error);
static SocketState Listen(SocketHandle handle, const IpAddress& address, unsigned int queueSize, SocketError* error);
static unsigned int QueryAvailableBytes(SocketHandle handle, SocketError* error = nullptr);
static std::size_t QueryAvailableBytes(SocketHandle handle, SocketError* error = nullptr);
static bool QueryBroadcasting(SocketHandle handle, SocketError* error = nullptr);
static bool QueryKeepAlive(SocketHandle handle, SocketError* error = nullptr);
static unsigned int QueryMaxDatagramSize(SocketHandle handle, SocketError* error = nullptr);
static std::size_t QueryMaxDatagramSize(SocketHandle handle, SocketError* error = nullptr);
static bool QueryNoDelay(SocketHandle handle, SocketError* error = nullptr);
static IpAddress QueryPeerAddress(SocketHandle handle, SocketError* error = nullptr);
static IpAddress QuerySocketAddress(SocketHandle handle, SocketError* error = nullptr);