11 #ifndef ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP 12 #define ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 35 template <
typename Protocol,
typename Handler>
47 cancel_token_(cancel_token),
49 io_service_impl_(ios),
60 ptr p = { asio::detail::addressof(o->handler_), o, o };
62 if (owner && owner != &o->io_service_impl_)
69 char service_name[NI_MAXSERV];
71 o->endpoint_.size(),
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
72 o->endpoint_.protocol().type(), o->ec_);
76 o->io_service_impl_.post_deferred_completion(o);
93 handler(o->handler_, o->ec_, o->iter_);
94 p.h = asio::detail::addressof(handler.
handler_);
109 endpoint_type endpoint_;
121 #endif // ASIO_DETAIL_RESOLVER_ENDPOINT_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
resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token, const endpoint_type &endpoint, io_service_impl &ios, Handler &handler)
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
static void do_complete(io_service_impl *owner, operation *base, const asio::error_code &, std::size_t)
#define ASIO_HANDLER_INVOCATION_BEGIN(args)
Class to represent an error code value.
asio::ip::basic_resolver_iterator< Protocol > iterator_type
task_io_service_operation operation
ASIO_DECL std::string host_name()
Get the current host name.
#define ASIO_HANDLER_COMPLETION(args)
Protocol::endpoint endpoint_type
#define ASIO_MOVE_CAST(type)
asio::error_code background_getnameinfo(const weak_cancel_token_type &cancel_token, const socket_addr_type *addr, std::size_t addrlen, char *host, std::size_t hostlen, char *serv, std::size_t servlen, int sock_type, asio::error_code &ec)
ASIO_DEFINE_HANDLER_PTR(resolve_endpoint_op)