Loading src/windows/socket.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -141,14 +141,10 @@ namespace netplus { } } // ------------------------------------------------------------------------- // socket::setTimeout // usec = microseconds -> Windows expects milliseconds // ------------------------------------------------------------------------- void socket::setTimeout(int usec) { void socket::setTimeout(int msec) { if (_Socket == INVALID_SOCKET) return; int ms = (usec <= 0) ? 0 : (usec / 1000); DWORD ms = (msec <= 0) ? 0 : (DWORD)msec; if (::setsockopt(_Socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&ms, sizeof(ms)) != 0) { Loading Loading
src/windows/socket.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -141,14 +141,10 @@ namespace netplus { } } // ------------------------------------------------------------------------- // socket::setTimeout // usec = microseconds -> Windows expects milliseconds // ------------------------------------------------------------------------- void socket::setTimeout(int usec) { void socket::setTimeout(int msec) { if (_Socket == INVALID_SOCKET) return; int ms = (usec <= 0) ? 0 : (usec / 1000); DWORD ms = (msec <= 0) ? 0 : (DWORD)msec; if (::setsockopt(_Socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&ms, sizeof(ms)) != 0) { Loading