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

Reference | Class Hierarchy | Class Index | Member Index

# asio::ip::basic_resolver_query< InternetProtocol > Class Template Reference

Inherits asio::ip::resolver_query_base.

Inheritance diagram for asio::ip::basic_resolver_query< InternetProtocol >:

List of all members.

## Detailed Description

### template<typename InternetProtocol>
class asio::ip::basic_resolver_query< InternetProtocol >

An query to be passed to a resolver.

The asio::ip::basic_resolver_query class template describes a query that can be passed to a resolver.

Thread Safety
  Distinct objects: Safe.
  Shared objects: Unsafe.

## Public Types

typedef InternetProtocol | protocol_type
| The protocol type associated with the endpoint query.

## Public Member Functions

| basic_resolver_query (const std::string &service_name, int flags=passive|address_configured)
| Construct with specified service name for any protocol.
| basic_resolver_query (const protocol_type &protocol, const std::string &service_name, int flags=passive|address_configured)
| Construct with specified service name for a given protocol.
| basic_resolver_query (const std::string &host_name, const std::string &service_name, int flags=address_configured)
| Construct with specified host name and service name for any protocol.
| basic_resolver_query (const protocol_type &protocol, const std::string &host_name, const std::string &service_name, int flags=address_configured)
| Construct with specified host name and service name for a given protocol.
const asio::detail::addrinfo_type & | hints () const
| Get the hints associated with the query.
std::string | host_name () const
| Get the host name associated with the query.
std::string | service_name () const
| Get the service name associated with the query.

## Static Public Attributes

static const int | canonical_name = implementation_defined
| Determine the canonical name of the host specified in the query.
static const int | passive = implementation_defined
| Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
static const int | numeric_host = implementation_defined
| Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
static const int | numeric_service = implementation_defined
| Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
static const int | v4_mapped = implementation_defined
| If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
static const int | all_matching = implementation_defined
| If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
static const int | address_configured = implementation_defined
| Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.

## Member Typedef Documentation

template<typename InternetProtocol>

typedef InternetProtocol asio::ip::basic_resolver_query< InternetProtocol >::protocol_type

The protocol type associated with the endpoint query.

## Constructor & Destructor Documentation

template<typename InternetProtocol>

asio::ip::basic_resolver_query< InternetProtocol >::basic_resolver_query | ( | const std::string & | service_name,
|  | int | flags = `passive | address_configured` |
| ) |  |  |

Construct with specified service name for any protocol.

template<typename InternetProtocol>

asio::ip::basic_resolver_query< InternetProtocol >::basic_resolver_query | ( | const protocol_type & | protocol,
|  | const std::string & | service_name,
|  | int | flags = `passive | address_configured` |
| ) |  |  |

Construct with specified service name for a given protocol.

template<typename InternetProtocol>

asio::ip::basic_resolver_query< InternetProtocol >::basic_resolver_query | ( | const std::string & | host_name,
|  | const std::string & | service_name,
|  | int | flags = `address_configured` |
| ) |  |  |

Construct with specified host name and service name for any protocol.

template<typename InternetProtocol>

asio::ip::basic_resolver_query< InternetProtocol >::basic_resolver_query | ( | const protocol_type & | protocol,
|  | const std::string & | host_name,
|  | const std::string & | service_name,
|  | int | flags = `address_configured` |
| ) |  |  |

Construct with specified host name and service name for a given protocol.

## Member Function Documentation

template<typename InternetProtocol>

const asio::detail::addrinfo_type& asio::ip::basic_resolver_query< InternetProtocol >::hints | ( |  | ) | const

Get the hints associated with the query.

template<typename InternetProtocol>

std::string asio::ip::basic_resolver_query< InternetProtocol >::host_name | ( |  | ) | const

Get the host name associated with the query.

template<typename InternetProtocol>

std::string asio::ip::basic_resolver_query< InternetProtocol >::service_name | ( |  | ) | const

Get the service name associated with the query.

## Member Data Documentation

const int asio::ip::resolver_query_base::canonical_name = implementation_defined`[static, inherited]`

Determine the canonical name of the host specified in the query.

const int asio::ip::resolver_query_base::passive = implementation_defined`[static, inherited]`

Indicate that returned endpoint is intended for use as a locally bound socket endpoint.

const int asio::ip::resolver_query_base::numeric_host = implementation_defined`[static, inherited]`

Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.

const int asio::ip::resolver_query_base::numeric_service = implementation_defined`[static, inherited]`

Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.

const int asio::ip::resolver_query_base::v4_mapped = implementation_defined`[static, inherited]`

If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.

const int asio::ip::resolver_query_base::all_matching = implementation_defined`[static, inherited]`

If used with v4_mapped, return all matching IPv6 and IPv4 addresses.

const int asio::ip::resolver_query_base::address_configured = implementation_defined`[static, inherited]`

Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.

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