this should work for both OSes
This commit is contained in:
parent
01e380c858
commit
69922e77c5
@ -177,7 +177,7 @@ void TcpTmTcServer::handleServerOperation(socket_t& connSocket) {
|
|||||||
ringBuffer.writeData(receptionBuffer.data(), retval);
|
ringBuffer.writeData(receptionBuffer.data(), retval);
|
||||||
}
|
}
|
||||||
else if(retval < 0) {
|
else if(retval < 0) {
|
||||||
int errorValue = GetLastError();
|
int errorValue = getLastSocketError();
|
||||||
#if defined PLATFORM_UNIX
|
#if defined PLATFORM_UNIX
|
||||||
int wouldBlockValue = EAGAIN;
|
int wouldBlockValue = EAGAIN;
|
||||||
#elif defined PLATFORM_WIN
|
#elif defined PLATFORM_WIN
|
||||||
@ -387,6 +387,7 @@ void TcpTmTcServer::handleSocketError(ConstStorageAccessor &accessor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined PLATFORM_WIN
|
||||||
void TcpTmTcServer::setSocketNonBlocking(socket_t &connSocket) {
|
void TcpTmTcServer::setSocketNonBlocking(socket_t &connSocket) {
|
||||||
u_long iMode = 1;
|
u_long iMode = 1;
|
||||||
int iResult = ioctlsocket(connSocket, FIONBIO, &iMode);
|
int iResult = ioctlsocket(connSocket, FIONBIO, &iMode);
|
||||||
@ -402,3 +403,4 @@ void TcpTmTcServer::setSocketNonBlocking(socket_t &connSocket) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user