Clementine
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
asio::ip::basic_resolver< InternetProtocol, Executor > Class Template Reference

Provides endpoint resolution functionality. More...

#include <basic_resolver.hpp>

Inheritance diagram for asio::ip::basic_resolver< InternetProtocol, Executor >:
Inheritance graph
[legend]
Collaboration diagram for asio::ip::basic_resolver< InternetProtocol, Executor >:
Collaboration graph
[legend]

Classes

struct  rebind_executor
 Rebinds the resolver type to another executor. More...
 

Public Types

typedef Executor executor_type
 The type of the executor associated with the object.
 
typedef InternetProtocol protocol_type
 The protocol type.
 
typedef InternetProtocol::endpoint endpoint_type
 The endpoint type.
 
typedef basic_resolver_query< InternetProtocol > query
 (Deprecated.) The query type.
 
typedef basic_resolver_iterator< InternetProtocol > iterator
 (Deprecated.) The iterator type.
 
typedef basic_resolver_results< InternetProtocol > results_type
 The results type.
 
- Public Types inherited from asio::ip::resolver_base
enum  flags {
  canonical_name = ASIO_OS_DEF(AI_CANONNAME), passive = ASIO_OS_DEF(AI_PASSIVE), numeric_host = ASIO_OS_DEF(AI_NUMERICHOST), numeric_service = ASIO_OS_DEF(AI_NUMERICSERV),
  v4_mapped = ASIO_OS_DEF(AI_V4MAPPED), all_matching = ASIO_OS_DEF(AI_ALL), address_configured = ASIO_OS_DEF(AI_ADDRCONFIG)
}
 

Public Member Functions

 basic_resolver (const executor_type &ex)
 Construct with executor. More...
 
template<typename ExecutionContext >
 basic_resolver (ExecutionContext &context, typename enable_if< is_convertible< ExecutionContext &, execution_context &>::value >::type *=0)
 Construct with execution context. More...
 
 ~basic_resolver ()
 Destroys the resolver. More...
 
executor_type get_executor () ASIO_NOEXCEPT
 Get the executor associated with the object.
 
void cancel ()
 Cancel any asynchronous operations that are waiting on the resolver. More...
 
results_type resolve (const query &q)
 (Deprecated: Use overload with separate host and service parameters.) Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (const query &q, asio::error_code &ec)
 (Deprecated: Use overload with separate host and service parameters.) Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, asio::error_code &ec)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags, asio::error_code &ec)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (const protocol_type &protocol, ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (const protocol_type &protocol, ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, asio::error_code &ec)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (const protocol_type &protocol, ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags)
 Perform forward resolution of a query to a list of entries. More...
 
results_type resolve (const protocol_type &protocol, ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags, asio::error_code &ec)
 Perform forward resolution of a query to a list of entries. More...
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(const query &q
 (Deprecated: Use overload with separate host and service parameters.) Asynchronously perform forward resolution of a query to a list of entries. More...
 
 ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(ASIO_STRING_VIEW_PARAM host
 Asynchronously perform forward resolution of a query to a list of entries. More...
 
ASIO_STRING_VIEW_PARAM ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(ASIO_STRING_VIEW_PARAM host
 Asynchronously perform forward resolution of a query to a list of entries. More...
 
ASIO_STRING_VIEW_PARAM resolver_base::flags ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(const protocol_type &protocol
 Asynchronously perform forward resolution of a query to a list of entries. More...
 
ASIO_STRING_VIEW_PARAM ASIO_STRING_VIEW_PARAM ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(const protocol_type &protocol
 Asynchronously perform forward resolution of a query to a list of entries. More...
 
ASIO_STRING_VIEW_PARAM ASIO_STRING_VIEW_PARAM resolver_base::flags ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 
results_type resolve (const endpoint_type &e)
 Perform reverse resolution of an endpoint to a list of entries. More...
 
results_type resolve (const endpoint_type &e, asio::error_code &ec)
 Perform reverse resolution of an endpoint to a list of entries. More...
 
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
 ASIO_INITFN_AUTO_RESULT_TYPE (ResolveHandler, void(asio::error_code, results_type)) async_resolve(const endpoint_type &e
 Asynchronously perform reverse resolution of an endpoint to a list of entries. More...
 
 ASIO_MOVE_ARG (ResolveHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
 

Public Attributes

ASIO_STRING_VIEW_PARAM service
 
ASIO_STRING_VIEW_PARAM resolver_base::flags resolve_flags
 
ASIO_STRING_VIEW_PARAM host
 
ASIO_STRING_VIEW_PARAM ASIO_STRING_VIEW_PARAM service
 
ASIO_STRING_VIEW_PARAM ASIO_STRING_VIEW_PARAM resolver_base::flags resolve_flags
 

Additional Inherited Members

- Protected Member Functions inherited from asio::ip::resolver_base
 ~resolver_base ()
 Protected destructor to prevent deletion through this type.
 

Detailed Description

template<typename InternetProtocol, typename Executor>
class asio::ip::basic_resolver< InternetProtocol, Executor >

Provides endpoint resolution functionality.

The basic_resolver class template provides the ability to resolve a query to a list of endpoints.

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

Constructor & Destructor Documentation

◆ basic_resolver() [1/2]

template<typename InternetProtocol , typename Executor >
asio::ip::basic_resolver< InternetProtocol, Executor >::basic_resolver ( const executor_type ex)
inlineexplicit

Construct with executor.

This constructor creates a basic_resolver.

Parameters
exThe I/O executor that the resolver will use, by default, to dispatch handlers for any asynchronous operations performed on the resolver.

◆ basic_resolver() [2/2]

template<typename InternetProtocol , typename Executor >
template<typename ExecutionContext >
asio::ip::basic_resolver< InternetProtocol, Executor >::basic_resolver ( ExecutionContext &  context,
typename enable_if< is_convertible< ExecutionContext &, execution_context &>::value >::type *  = 0 
)
inlineexplicit

Construct with execution context.

This constructor creates a basic_resolver.

Parameters
contextAn execution context which provides the I/O executor that the resolver will use, by default, to dispatch handlers for any asynchronous operations performed on the resolver.

◆ ~basic_resolver()

template<typename InternetProtocol , typename Executor >
asio::ip::basic_resolver< InternetProtocol, Executor >::~basic_resolver ( )
inline

Destroys the resolver.

This function destroys the resolver, cancelling any outstanding asynchronous wait operations associated with the resolver as if by calling cancel.

Member Function Documentation

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [1/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
) const &

(Deprecated: Use overload with separate host and service parameters.) Asynchronously perform forward resolution of a query to a list of entries.

This function is used to asynchronously resolve a query into a list of endpoint entries.

Parameters
qA query object that determines what endpoints will be returned.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [2/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
)

Asynchronously perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [3/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
)

Asynchronously perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [4/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
) const &

Asynchronously perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [5/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
) const &

Asynchronously perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ ASIO_INITFN_AUTO_RESULT_TYPE() [6/6]

template<typename InternetProtocol , typename Executor >
template<ASIO_COMPLETION_TOKEN_FOR(void(asio::error_code, results_type)) ResolveHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type) >
asio::ip::basic_resolver< InternetProtocol, Executor >::ASIO_INITFN_AUTO_RESULT_TYPE ( ResolveHandler  ,
void(asio::error_code, results_type  
) const &

Asynchronously perform reverse resolution of an endpoint to a list of entries.

This function is used to asynchronously resolve an endpoint into a list of endpoint entries.

Parameters
eAn endpoint object that determines what endpoints will be returned.
handlerThe handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
void handler(
const asio::error_code& error, // Result of operation.
resolver::results_type results // Resolved endpoints as a range.
);
Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. On immediate completion, invocation of the handler will be performed in a manner equivalent to using asio::post().

A successful resolve operation is guaranteed to pass a non-empty range to the handler.

◆ cancel()

template<typename InternetProtocol , typename Executor >
void asio::ip::basic_resolver< InternetProtocol, Executor >::cancel ( )
inline

Cancel any asynchronous operations that are waiting on the resolver.

This function forces the completion of any pending asynchronous operations on the host resolver. The handler for each cancelled operation will be invoked with the asio::error::operation_aborted error code.

◆ resolve() [1/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const query q)
inline

(Deprecated: Use overload with separate host and service parameters.) Perform forward resolution of a query to a list of entries.

This function is used to resolve a query into a list of endpoint entries.

Parameters
qA query object that determines what endpoints will be returned.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.

◆ resolve() [2/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const query q,
asio::error_code ec 
)
inline

(Deprecated: Use overload with separate host and service parameters.) Perform forward resolution of a query to a list of entries.

This function is used to resolve a query into a list of endpoint entries.

Parameters
qA query object that determines what endpoints will be returned.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.

◆ resolve() [3/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [4/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
asio::error_code ec 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [5/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
resolver_base::flags  resolve_flags 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [6/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
resolver_base::flags  resolve_flags,
asio::error_code ec 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [7/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const protocol_type protocol,
ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [8/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const protocol_type protocol,
ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
asio::error_code ec 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [9/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const protocol_type protocol,
ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
resolver_base::flags  resolve_flags 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [10/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const protocol_type protocol,
ASIO_STRING_VIEW_PARAM  host,
ASIO_STRING_VIEW_PARAM  service,
resolver_base::flags  resolve_flags,
asio::error_code ec 
)
inline

Perform forward resolution of a query to a list of entries.

This function is used to resolve host and service names into a list of endpoint entries.

Parameters
protocolA protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.
hostA string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.
serviceA string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.
resolve_flagsA set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts. See the resolver_base documentation for the set of available flags.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
Note
On POSIX systems, host names may be locally defined in the file /etc/hosts. On Windows, host names may be defined in the file c:\windows\system32\drivers\etc\hosts. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).

On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.

◆ resolve() [11/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const endpoint_type e)
inline

Perform reverse resolution of an endpoint to a list of entries.

This function is used to resolve an endpoint into a list of endpoint entries.

Parameters
eAn endpoint object that determines what endpoints will be returned.
Returns
A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
Exceptions
asio::system_errorThrown on failure.

◆ resolve() [12/12]

template<typename InternetProtocol , typename Executor >
results_type asio::ip::basic_resolver< InternetProtocol, Executor >::resolve ( const endpoint_type e,
asio::error_code ec 
)
inline

Perform reverse resolution of an endpoint to a list of entries.

This function is used to resolve an endpoint into a list of endpoint entries.

Parameters
eAn endpoint object that determines what endpoints will be returned.
ecSet to indicate what error occurred, if any.
Returns
A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.

The documentation for this class was generated from the following file: