Reference | Class Hierarchy | Class Index | Member Index |
Typedefs | |
typedef implementation_defined | join_group |
Socket option to join a multicast group on a specified interface. | |
typedef implementation_defined | leave_group |
Socket option to leave a multicast group on a specified interface. | |
typedef implementation_defined | outbound_interface |
Socket option for local interface to use for outgoing multicast packets. | |
typedef implementation_defined | hops |
Socket option for time-to-live associated with outgoing multicast packets. | |
typedef implementation_defined | 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. |
typedef implementation_defined 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.
asio::ip::udp::socket socket(io_service); ... asio::ip::address multicast_address = asio::ip::address::from_string("225.0.0.1"); asio::ip::multicast::join_group option(multicast_address); socket.set_option(option);
typedef implementation_defined 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.
asio::ip::udp::socket socket(io_service); ... asio::ip::address multicast_address = asio::ip::address::from_string("225.0.0.1"); asio::ip::multicast::leave_group option(multicast_address); socket.set_option(option);
typedef implementation_defined 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.
asio::ip::udp::socket socket(io_service); ... asio::ip::address_v4 local_interface = asio::ip::address_v4::from_string("1.2.3.4"); asio::ip::multicast::outbound_interface option(local_interface); socket.set_option(option);
typedef implementation_defined asio::ip::multicast::hops |
Socket option for time-to-live associated with outgoing multicast packets.
Implements the IPPROTO_IP/IP_MULTICAST_TTL socket option.
asio::ip::udp::socket socket(io_service); ... asio::ip::multicast::hops option(4); socket.set_option(option);
asio::ip::udp::socket socket(io_service); ... asio::ip::multicast::hops option; socket.get_option(option); int ttl = option.value();
typedef implementation_defined 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.
asio::ip::udp::socket socket(io_service); ... asio::ip::multicast::enable_loopback option(true); socket.set_option(option);
asio::ip::udp::socket socket(io_service); ... asio::ip::multicast::enable_loopback option; socket.get_option(option); bool is_set = option.value();