asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design
Reference Class Hierarchy | Class Index | Member Index

asio::ip::unicast Namespace Reference


Detailed Description

The asio::ip::unicast namespace defines the socket options used for unicast.


Typedefs

typedef implementation_defined hops
 Socket option for time-to-live associated with outgoing unicast packets.


Typedef Documentation

typedef implementation_defined asio::ip::unicast::hops

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

Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.

Examples
Setting the option:
 asio::ip::udp::socket socket(io_service); 
 ...
 asio::ip::unicast::hops option(4);
 socket.set_option(option);
Getting the current option value:
 asio::ip::udp::socket socket(io_service); 
 ...
 asio::ip::unicast::hops option;
 socket.get_option(option);
 int ttl = option.value();
Concepts:
GettableSocketOption, SettableSocketOption.

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design