boost::corosio::socket_option

Type‐erased socket option types that avoid platform‐specific headers. The protocol level and option name for each type are resolved at link time via the compiled library.

Description

For an inline (zero‐overhead) alternative that includes platform headers, use <boost/corosio/native/native_socket_option.hpp> (boost::corosio::native_socket_option).

Both variants satisfy the same option‐type interface and work interchangeably with tcp_socket::set_option / tcp_socket::get_option and the corresponding acceptor methods.

Types

Name

Description

boolean_option

Base class for concrete boolean socket options.

broadcast

Allow sending to broadcast addresses (SO_BROADCAST).

byte_boolean_option

Base class for concrete boolean socket options with single‐byte storage.

byte_integer_option

Base class for concrete integer socket options with single‐byte storage.

integer_option

Base class for concrete integer socket options.

join_group_v4

Join an IPv4 multicast group (IP_ADD_MEMBERSHIP).

join_group_v6

Join an IPv6 multicast group (IPV6_JOIN_GROUP).

keep_alive

Enable periodic keepalive probes (SO_KEEPALIVE).

leave_group_v4

Leave an IPv4 multicast group (IP_DROP_MEMBERSHIP).

leave_group_v6

Leave an IPv6 multicast group (IPV6_LEAVE_GROUP).

linger

The SO_LINGER socket option.

multicast_hops_v4

Set the multicast TTL for IPv4 (IP_MULTICAST_TTL).

multicast_hops_v6

Set the multicast hop limit for IPv6 (IPV6_MULTICAST_HOPS).

multicast_interface_v4

Set the outgoing interface for IPv4 multicast (IP_MULTICAST_IF).

multicast_interface_v6

Set the outgoing interface for IPv6 multicast (IPV6_MULTICAST_IF).

multicast_loop_v4

Enable loopback of outgoing multicast on IPv4 (IP_MULTICAST_LOOP).

multicast_loop_v6

Enable loopback of outgoing multicast on IPv6 (IPV6_MULTICAST_LOOP).

no_delay

Disable Nagle's algorithm (TCP_NODELAY).

receive_buffer_size

Set the receive buffer size (SO_RCVBUF).

reuse_address

Allow local address reuse (SO_REUSEADDR).

reuse_port

Allow multiple sockets to bind to the same port (SO_REUSEPORT).

send_buffer_size

Set the send buffer size (SO_SNDBUF).

v6_only

Restrict an IPv6 socket to IPv6 only (IPV6_V6ONLY).

See Also

native_socket_option

Created with MrDocs