boost::corosio::socket_option::multicast_hops_v4

Set the multicast TTL for IPv4 (IP_MULTICAST_TTL).

Synopsis

class multicast_hops_v4
    : public byte_integer_option

Description

Uses single‐byte storage because BSD‐derived kernels (macOS, FreeBSD) reject the four‐byte form with EINVAL. Linux accepts either size. Values are truncated to the 0–255 range.

Example

sock.set_option( socket_option::multicast_hops_v4( 4 ) );

Base Classes

Name

Description

byte_integer_option

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

Member Functions

Name

Description

operator=

Assign a new value; truncated to one byte.

data

Return a pointer to the underlying storage.

resize

Storage is already one byte; no normalization needed.

size

Return the size of the underlying storage.

value

Return the option value.

Static Member Functions

Name

Description

level

Return the protocol level.

name

Return the option name.

Using Declarations

Name

multicast_hops_v4

operator=

Created with MrDocs