Sets a socket option.

Synopsis

Declared in <folly/net/NetOps.h>

int
setsockopt(
    NetworkSocket s,
    int level,
    int optname,
    void const* optval,
    socklen_t optlen);

Return Value

0 on success, or ‐1 on error.

Parameters

Name

Description

s

The socket to modify.

level

The protocol level of the option.

optname

The option name.

optval

The option value to set.

optlen

The length of the value.

Created with MrDocs