SETSOCKOPT(2)

NAME
setsockopt - set the value of a socket option.

SYNOPSIS
#include <sys/socket.h>
int setsockopt(int sd, int level, int opt_name, const void * opt_val, socklen_t opt_len);

DESCRIPTION
setsockopt() provides an interface to set the value of a specific option, referenced by opt_name, for a given socket descriptor sd.

RETURN VALUES
On success, this function returns 0. On error, -1 is returned and errno is set.

ERRORS

[ENOSYS]
    The option opt_name is not available/supported at the level specified for the socket sd.

[ENOTSOCK]
    sd is not a socket descriptor.

SEE ALSO
socket(2), socketpair(2), getsockopt(2)