Fix type.

This commit is contained in:
Jean-Baptiste Perrier
2021-01-23 20:19:21 +01:00
parent 3c1a69eb6f
commit 54da2c8de0
4 changed files with 8 additions and 8 deletions

View File

@@ -41,12 +41,12 @@ bool NetworkBase::IsReadable(NetworkSocket& socket, uint64* size)
return false;
}
uint32 NetworkBase::WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint)
int32 NetworkBase::WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint)
{
return 0;
}
uint32 NetworkBase::ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint)
int32 NetworkBase::ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint)
{
return 0;
}

View File

@@ -55,8 +55,8 @@ class FLAXENGINE_API NetworkBase
static bool BindSocket(NetworkSocket& socket, NetworkEndPoint& endPoint);
static bool Accept(NetworkSocket& serverSock, NetworkSocket& newSock, NetworkEndPoint& newEndPoint);
static bool IsReadable(NetworkSocket& socket, uint64* size);
static uint32 WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint = nullptr);
static uint32 ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint = nullptr);
static int32 WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint = nullptr);
static int32 ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint = nullptr);
static bool CreateEndPoint(String* address, String* port, NetworkIPVersion ipv, NetworkEndPoint& endPoint);
static NetworkEndPoint RemapEndPointToIPv6(NetworkEndPoint& endPoint);
};

View File

@@ -228,7 +228,7 @@ bool Win32Network::IsReadable(NetworkSocket& socket, uint64* size)
return false;
}
uint32 Win32Network::WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint)
int32 Win32Network::WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint)
{
if (socket.IPVersion != endPoint->IPVersion)
{
@@ -264,7 +264,7 @@ uint32 Win32Network::WriteSocket(NetworkSocket socket, byte* data, uint32 length
/*
* TODO: handle size == 0 when there is a shutdown
*/
uint32 Win32Network::ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint)
int32 Win32Network::ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint)
{
uint32 size;
if (endPoint == nullptr) // TCP

View File

@@ -18,8 +18,8 @@ public:
static bool BindSocket(NetworkSocket& socket, NetworkEndPoint& endPoint);
static bool Accept(NetworkSocket& serverSock, NetworkSocket& newSock, NetworkEndPoint& newEndPoint);
static bool IsReadable(NetworkSocket& socket, uint64* size);
static uint32 WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint = nullptr);
static uint32 ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint = nullptr);
static int32 WriteSocket(NetworkSocket socket, byte* data, uint32 length, NetworkEndPoint* endPoint = nullptr);
static int32 ReadSocket(NetworkSocket socket, byte* buffer, uint32 bufferSize, NetworkEndPoint* endPoint = nullptr);
static bool CreateEndPoint(String* address, String* port, NetworkIPVersion ipv, NetworkEndPoint& endPoint);
static NetworkEndPoint RemapEndPointToIPv6(NetworkEndPoint endPoint);
friend NetworkEndPoint;