improvements

This commit is contained in:
Robin Müller 2023-05-25 15:01:53 +02:00
parent e905288adc
commit 2714e588d7
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -40,8 +40,9 @@ int TcpIpBase::closeSocket(socket_t socket) {
return closesocket(socket); return closesocket(socket);
#elif defined(PLATFORM_UNIX) #elif defined(PLATFORM_UNIX)
return close(socket); return close(socket);
#endif #else
return -1; return -1;
#endif
} }
int TcpIpBase::getLastSocketError() { int TcpIpBase::getLastSocketError() {
@ -49,6 +50,7 @@ int TcpIpBase::getLastSocketError() {
return WSAGetLastError(); return WSAGetLastError();
#elif defined(PLATFORM_UNIX) #elif defined(PLATFORM_UNIX)
return errno; return errno;
#endif #else
return 0; return 0;
#endif
} }