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 Namespace Reference

Namespaces

 multicast
 
 unicast
 

Classes

class  address
 Implements version-independent IP addresses. More...
 
class  address_v4
 Implements IP version 4 style addresses. More...
 
class  address_v6
 Implements IP version 6 style addresses. More...
 
class  basic_endpoint
 Describes an endpoint for a version-independent IP socket. More...
 
class  basic_resolver
 Provides endpoint resolution functionality. More...
 
class  basic_resolver_entry
 An entry produced by a resolver. More...
 
class  basic_resolver_iterator
 An iterator over the entries produced by a resolver. More...
 
class  basic_resolver_query
 An query to be passed to a resolver. More...
 
class  icmp
 Encapsulates the flags needed for ICMP. More...
 
class  resolver_query_base
 The resolver_query_base class is used as a base for the basic_resolver_query class templates to provide a common place to define the flag constants. More...
 
class  resolver_service
 Default service implementation for a resolver. More...
 
class  tcp
 Encapsulates the flags needed for TCP. More...
 
class  udp
 Encapsulates the flags needed for UDP. More...
 

Typedefs

typedef
boost::asio::detail::socket_option::boolean
< boost::asio::detail::custom_socket_option_level,
boost::asio::detail::always_fail_option > 
v6_only
 Socket option for determining whether an IPv6 socket supports IPv6 communication only. More...
 

Functions

BOOST_ASIO_DECL std::string host_name ()
 Get the current host name. More...
 
BOOST_ASIO_DECL std::string host_name (boost::system::error_code &ec)
 Get the current host name. More...
 

Typedef Documentation

typedef boost::asio::detail::socket_option::boolean< boost::asio::detail::custom_socket_option_level, boost::asio::detail::always_fail_option> boost::asio::ip::v6_only

Socket option for determining whether an IPv6 socket supports IPv6 communication only.

Implements the IPPROTO_IPV6/IP_V6ONLY socket option.

Examples
Setting the option:
boost::asio::ip::tcp::socket socket(io_service);
...
boost::asio::ip::v6_only option(true);
socket.set_option(option);
Getting the current option value:
boost::asio::ip::tcp::socket socket(io_service);
...
boost::asio::ip::v6_only option;
socket.get_option(option);
bool v6_only = option.value();
Concepts:
GettableSocketOption, SettableSocketOption.

Function Documentation

BOOST_ASIO_DECL std::string boost::asio::ip::host_name ( )
BOOST_ASIO_DECL std::string boost::asio::ip::host_name ( boost::system::error_code ec)

Get the current host name.