folly::applySocketOptions

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

NameDescription
fdThe socket to apply the options to.
optionsThe socket options to apply.
posWhether to apply options before or after bind().