Home | Libraries | People | FAQ | More |
Socket option for time-to-live associated with outgoing unicast packets.
typedef implementation_defined hops;
Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
Setting the option:
boost::asio::ip::udp::socket socket(io_context); ... boost::asio::ip::unicast::hops option(4); socket.set_option(option);
Getting the current option value:
boost::asio::ip::udp::socket socket(io_context); ... boost::asio::ip::unicast::hops option; socket.get_option(option); int ttl = option.value();
Header: boost/asio/ip/unicast.hpp
Convenience header: boost/asio.hpp