11 #ifndef ASIO_DETAIL_RESOLVE_OP_HPP 12 #define ASIO_DETAIL_RESOLVE_OP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 36 template <
typename Protocol,
typename Handler>
48 cancel_token_(cancel_token),
50 io_service_impl_(ios),
68 ptr p = { asio::detail::addressof(o->handler_), o, o };
70 if (owner && owner != &o->io_service_impl_)
77 o->query_.host_name().c_str(), o->query_.service_name().c_str(),
78 o->query_.hints(), &o->addrinfo_, o->ec_);
81 o->io_service_impl_.post_deferred_completion(o);
98 handler(o->handler_, o->ec_, iterator_type());
99 p.h = asio::detail::addressof(handler.
handler_);
103 o->query_.host_name(), o->query_.service_name());
131 #endif // ASIO_DETAIL_RESOLVE_OP_HPP static basic_resolver_iterator create(asio::detail::addrinfo_type *address_info, const std::string &host_name, const std::string &service_name)
Create an iterator from an addrinfo list returned by getaddrinfo.
#define ASIO_HANDLER_INVOCATION_END
ASIO_DEFINE_HANDLER_PTR(resolve_op)
resolve_op(socket_ops::weak_cancel_token_type cancel_token, const query_type &query, io_service_impl &ios, Handler &handler)
asio::ip::basic_resolver_iterator< Protocol > iterator_type
asio::basic_streambuf< Allocator > & b
class task_io_service io_service_impl
void invoke(Function &function, Context &context)
weak_ptr< void > weak_cancel_token_type
asio::error_code background_getaddrinfo(const weak_cancel_token_type &cancel_token, const char *host, const char *service, const addrinfo_type &hints, addrinfo_type **result, asio::error_code &ec)
#define ASIO_HANDLER_INVOCATION_BEGIN(args)
void freeaddrinfo(addrinfo_type *ai)
Class to represent an error code value.
task_io_service_operation operation
asio::ip::basic_resolver_query< Protocol > query_type
#define ASIO_HANDLER_COMPLETION(args)
#define ASIO_MOVE_CAST(type)
static void do_complete(io_service_impl *owner, operation *base, const asio::error_code &, std::size_t)