Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::ip::multicast Namespace Reference

Typedefs

typedef
boost::asio::ip::detail::socket_option::multicast_request
< BOOST_ASIO_OS_DEF(IPPROTO_IP),
BOOST_ASIO_OS_DEF(IP_ADD_MEMBERSHIP),
BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
BOOST_ASIO_OS_DEF(IPV6_JOIN_GROUP)> 
join_group
 Socket option to join a multicast group on a specified interface. More...
 
typedef
boost::asio::ip::detail::socket_option::multicast_request
< BOOST_ASIO_OS_DEF(IPPROTO_IP),
BOOST_ASIO_OS_DEF(IP_DROP_MEMBERSHIP),
BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
BOOST_ASIO_OS_DEF(IPV6_LEAVE_GROUP)> 
leave_group
 Socket option to leave a multicast group on a specified interface. More...
 
typedef
boost::asio::ip::detail::socket_option::network_interface
< BOOST_ASIO_OS_DEF(IPPROTO_IP),
BOOST_ASIO_OS_DEF(IP_MULTICAST_IF),
BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
BOOST_ASIO_OS_DEF(IPV6_MULTICAST_IF)> 
outbound_interface
 Socket option for local interface to use for outgoing multicast packets. More...
 
typedef
boost::asio::ip::detail::socket_option::multicast_hops
< BOOST_ASIO_OS_DEF(IPPROTO_IP),
BOOST_ASIO_OS_DEF(IP_MULTICAST_TTL),
BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
BOOST_ASIO_OS_DEF(IPV6_MULTICAST_HOPS)> 
hops
 Socket option for time-to-live associated with outgoing multicast packets. More...
 
typedef
boost::asio::ip::detail::socket_option::multicast_enable_loopback
< BOOST_ASIO_OS_DEF(IPPROTO_IP),
BOOST_ASIO_OS_DEF(IP_MULTICAST_LOOP),
BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
BOOST_ASIO_OS_DEF(IPV6_MULTICAST_LOOP)> 
enable_loopback
 Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group. More...
 

Typedef Documentation

typedef boost::asio::ip::detail::socket_option::multicast_enable_loopback< BOOST_ASIO_OS_DEF(IPPROTO_IP), BOOST_ASIO_OS_DEF(IP_MULTICAST_LOOP), BOOST_ASIO_OS_DEF(IPPROTO_IPV6), BOOST_ASIO_OS_DEF(IPV6_MULTICAST_LOOP)> boost::asio::ip::multicast::enable_loopback

Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group.

Implements the IPPROTO_IP/IP_MULTICAST_LOOP socket option.

Examples
Setting the option:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::multicast::enable_loopback option(true);
socket.set_option(option);
Getting the current option value:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::multicast::enable_loopback option;
socket.get_option(option);
bool is_set = option.value();
Concepts:
GettableSocketOption, SettableSocketOption.
typedef boost::asio::ip::detail::socket_option::multicast_hops< BOOST_ASIO_OS_DEF(IPPROTO_IP), BOOST_ASIO_OS_DEF(IP_MULTICAST_TTL), BOOST_ASIO_OS_DEF(IPPROTO_IPV6), BOOST_ASIO_OS_DEF(IPV6_MULTICAST_HOPS)> boost::asio::ip::multicast::hops

Socket option for time-to-live associated with outgoing multicast packets.

Implements the IPPROTO_IP/IP_MULTICAST_TTL socket option.

Examples
Setting the option:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::multicast::hops option(4);
socket.set_option(option);
Getting the current option value:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::multicast::hops option;
socket.get_option(option);
int ttl = option.value();
Concepts:
GettableSocketOption, SettableSocketOption.
typedef boost::asio::ip::detail::socket_option::multicast_request< BOOST_ASIO_OS_DEF(IPPROTO_IP), BOOST_ASIO_OS_DEF(IP_ADD_MEMBERSHIP), BOOST_ASIO_OS_DEF(IPPROTO_IPV6), BOOST_ASIO_OS_DEF(IPV6_JOIN_GROUP)> boost::asio::ip::multicast::join_group

Socket option to join a multicast group on a specified interface.

Implements the IPPROTO_IP/IP_ADD_MEMBERSHIP socket option.

Examples
Setting the option to join a multicast group:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::address multicast_address =
socket.set_option(option);
Concepts:
SettableSocketOption.
typedef boost::asio::ip::detail::socket_option::multicast_request< BOOST_ASIO_OS_DEF(IPPROTO_IP), BOOST_ASIO_OS_DEF(IP_DROP_MEMBERSHIP), BOOST_ASIO_OS_DEF(IPPROTO_IPV6), BOOST_ASIO_OS_DEF(IPV6_LEAVE_GROUP)> boost::asio::ip::multicast::leave_group

Socket option to leave a multicast group on a specified interface.

Implements the IPPROTO_IP/IP_DROP_MEMBERSHIP socket option.

Examples
Setting the option to leave a multicast group:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::address multicast_address =
socket.set_option(option);
Concepts:
SettableSocketOption.
typedef boost::asio::ip::detail::socket_option::network_interface< BOOST_ASIO_OS_DEF(IPPROTO_IP), BOOST_ASIO_OS_DEF(IP_MULTICAST_IF), BOOST_ASIO_OS_DEF(IPPROTO_IPV6), BOOST_ASIO_OS_DEF(IPV6_MULTICAST_IF)> boost::asio::ip::multicast::outbound_interface

Socket option for local interface to use for outgoing multicast packets.

Implements the IPPROTO_IP/IP_MULTICAST_IF socket option.

Examples
Setting the option:
boost::asio::ip::udp::socket socket(io_service);
...
boost::asio::ip::address_v4 local_interface =
socket.set_option(option);
Concepts:
SettableSocketOption.