Skip to content
SocketSetRecvTimeoutMs

SocketSetRecvTimeoutMs

Description

Cap how long a single recv call may block, in milliseconds.

Success

Returns true. The fd has the requested timeout.

Failure

Returns false. The fd is unchanged; the failing syscall is logged.

Usage example (Cross-references)

Usage examples (Cross-references)
            return -1;
        }
        if (!SocketSetRecvTimeoutMs(sock.fd, timeout_ms)) {
            SocketClose(&sock);
            return -1;
    }
    
    bool SocketSetRecvTimeoutMs(SockFd fd, u32 ms) {
    #if PLATFORM_WINDOWS
        DWORD tv = (DWORD)ms;
Last updated on