#include <basic_resolver.hpp>

Public Types | |
| typedef InternetProtocol | protocol_type |
| The protocol type. | |
| typedef InternetProtocol::endpoint | endpoint_type |
| The endpoint type. | |
| typedef InternetProtocol::resolver_query | query |
| The query type. | |
| typedef InternetProtocol::resolver_iterator | iterator |
| The iterator type. | |
Public Member Functions | |
| basic_resolver (asio::io_service &io_service) | |
| Constructor. | |
| void | cancel () |
| Cancel any asynchronous operations that are waiting on the resolver. | |
| iterator | resolve (const query &q) |
| Resolve a query to a list of entries. | |
| iterator | resolve (const query &q, asio::error_code &ec) |
| Resolve a query to a list of entries. | |
| template<typename ResolveHandler> | |
| void | async_resolve (const query &q, ResolveHandler handler) |
| Asynchronously resolve a query to a list of entries. | |
| iterator | resolve (const endpoint_type &e) |
| Resolve an endpoint to a list of entries. | |
| iterator | resolve (const endpoint_type &e, asio::error_code &ec) |
| Resolve an endpoint to a list of entries. | |
| template<typename ResolveHandler> | |
| void | async_resolve (const endpoint_type &e, ResolveHandler handler) |
| Asynchronously resolve an endpoint to a list of entries. | |
The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
Definition at line 39 of file basic_resolver.hpp.
| typedef InternetProtocol asio::ip::basic_resolver< InternetProtocol, ResolverService >::protocol_type |
| typedef InternetProtocol::endpoint asio::ip::basic_resolver< InternetProtocol, ResolverService >::endpoint_type |
| typedef InternetProtocol::resolver_query asio::ip::basic_resolver< InternetProtocol, ResolverService >::query |
| typedef InternetProtocol::resolver_iterator asio::ip::basic_resolver< InternetProtocol, ResolverService >::iterator |
| asio::ip::basic_resolver< InternetProtocol, ResolverService >::basic_resolver | ( | asio::io_service & | io_service | ) | [inline, explicit] |
Constructor.
This constructor creates a basic_resolver.
| io_service | The io_service object that the resolver will use to dispatch handlers for any asynchronous operations performed on the timer. |
Definition at line 62 of file basic_resolver.hpp.
| void asio::ip::basic_resolver< InternetProtocol, ResolverService >::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.
Definition at line 73 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, and asio::basic_io_object< ResolverService >::service.
Referenced by libtorrent::udp_tracker_connection::on_timeout(), and libtorrent::http_tracker_connection::on_timeout().
| iterator asio::ip::basic_resolver< InternetProtocol, ResolverService >::resolve | ( | const query & | q | ) | [inline] |
Resolve a query to a list of entries.
This function is used to resolve a query into a list of endpoint entries.
| q | A query object that determines what endpoints will be returned. |
| asio::system_error | Thrown on failure. |
Definition at line 94 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, asio::basic_io_object< ResolverService >::service, and asio::detail::throw_error().
| iterator asio::ip::basic_resolver< InternetProtocol, ResolverService >::resolve | ( | const query & | q, | |
| asio::error_code & | ec | |||
| ) | [inline] |
Resolve a query to a list of entries.
This function is used to resolve a query into a list of endpoint entries.
| q | A query object that determines what endpoints will be returned. | |
| ec | Set to indicate what error occurred, if any. |
Definition at line 119 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, and asio::basic_io_object< ResolverService >::service.
| void asio::ip::basic_resolver< InternetProtocol, ResolverService >::async_resolve | ( | const query & | q, | |
| ResolveHandler | handler | |||
| ) | [inline] |
Asynchronously resolve a query to a list of entries.
This function is used to asynchronously resolve a query into a list of endpoint entries.
| q | A query object that determines what endpoints will be returned. | |
| handler | The 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::iterator iterator // Forward-only iterator that can // be used to traverse the list // of endpoint entries. ); |
Definition at line 151 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, and asio::basic_io_object< ResolverService >::service.
Referenced by libtorrent::dht::dht_tracker::add_node(), libtorrent::dht::dht_tracker::add_router_node(), libtorrent::torrent::connect_to_url_seed(), libtorrent::http_tracker_connection::http_tracker_connection(), libtorrent::torrent::on_proxy_name_lookup(), libtorrent::torrent::resolve_peer_country(), libtorrent::torrent::tracker_response(), and libtorrent::udp_tracker_connection::udp_tracker_connection().
| iterator asio::ip::basic_resolver< InternetProtocol, ResolverService >::resolve | ( | const endpoint_type & | e | ) | [inline] |
Resolve an endpoint to a list of entries.
This function is used to resolve an endpoint into a list of endpoint entries.
| e | An endpoint object that determines what endpoints will be returned. |
| asio::system_error | Thrown on failure. |
Definition at line 174 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, asio::basic_io_object< ResolverService >::service, and asio::detail::throw_error().
| iterator asio::ip::basic_resolver< InternetProtocol, ResolverService >::resolve | ( | const endpoint_type & | e, | |
| asio::error_code & | ec | |||
| ) | [inline] |
Resolve an endpoint to a list of entries.
This function is used to resolve an endpoint into a list of endpoint entries.
| e | An endpoint object that determines what endpoints will be returned. | |
| ec | Set to indicate what error occurred, if any. |
Definition at line 201 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, and asio::basic_io_object< ResolverService >::service.
| void asio::ip::basic_resolver< InternetProtocol, ResolverService >::async_resolve | ( | const endpoint_type & | e, | |
| ResolveHandler | handler | |||
| ) | [inline] |
Asynchronously resolve an endpoint to a list of entries.
This function is used to asynchronously resolve an endpoint into a list of endpoint entries.
| e | An endpoint object that determines what endpoints will be returned. | |
| handler | The 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::iterator iterator // Forward-only iterator that can // be used to traverse the list // of endpoint entries. ); |
Definition at line 234 of file basic_resolver.hpp.
References asio::basic_io_object< ResolverService >::implementation, and asio::basic_io_object< ResolverService >::service.
1.5.6