Applies the given socket options to a socket at the given position.

Synopsis

Declared in <folly/io/SocketOptionMap.h>

int
applySocketOptions(
    NetworkSocket fd,
    SocketOptionMap const& options,
    SocketOptionKey::ApplyPos pos);

Return Value

Zero on success, or a non‐zero error code on failure.

Parameters

Name

Description

fd

The socket to apply the options to.

options

The socket options to apply.

pos

Whether to apply options before or after bind().

Created with MrDocs