Commit 952d5080 authored by jan.koester's avatar jan.koester
Browse files

test

parent e31160c0
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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) {