Skip to content
SocketSetNoDelay

SocketSetNoDelay

Description

Toggle TCP_NODELAY (Nagle off when true).

Success

Returns true. The fd has the requested setting.

Failure

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

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    bool SocketSetNoDelay(SockFd fd, bool nodelay) {
        i32 v = nodelay ? 1 : 0;
        return plat_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v));
Last updated on