本文整理汇总了C++中query_type类的典型用法代码示例。如果您正苦于以下问题:C++ query_type类的具体用法?C++ query_type怎么用?C++ query_type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了query_type类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: async_resolve
void async_resolve(implementation_type&,
const query_type& query, Handler& handler)
{
bool is_continuation =
pdalboost_asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
typedef winrt_resolve_op<Protocol, Handler> op;
typename op::ptr p = { pdalboost::asio::detail::addressof(handler),
pdalboost_asio_handler_alloc_helpers::allocate(
sizeof(op), handler), 0 };
p.p = new (p.v) op(query, handler);
BOOST_ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));
try
{
using namespace Windows::Networking::Sockets;
async_manager_.async(DatagramSocket::GetEndpointPairsAsync(
winrt_utils::host_name(query.host_name()),
winrt_utils::string(query.service_name())), p.p);
p.v = p.p = 0;
}
catch (Platform::Exception^ e)
{
p.p->ec_ = pdalboost::system::error_code(
e->HResult, pdalboost::system::system_category());
io_service_.post_immediate_completion(p.p, is_continuation);
p.v = p.p = 0;
}
}
开发者ID:AsherBond,项目名称:PDAL,代码行数:31,代码来源:winrt_resolver_service.hpp
示例2: resolve
// Resolve a query to a list of entries.
iterator_type resolve(implementation_type&,
const query_type& query, pdalboost::system::error_code& ec)
{
try
{
using namespace Windows::Networking::Sockets;
auto endpoint_pairs = async_manager_.sync(
DatagramSocket::GetEndpointPairsAsync(
winrt_utils::host_name(query.host_name()),
winrt_utils::string(query.service_name())), ec);
if (ec)
return iterator_type();
return iterator_type::create(
endpoint_pairs, query.hints(),
query.host_name(), query.service_name());
}
catch (Platform::Exception^ e)
{
ec = pdalboost::system::error_code(e->HResult,
pdalboost::system::system_category());
return iterator_type();
}
}
开发者ID:AsherBond,项目名称:PDAL,代码行数:26,代码来源:winrt_resolver_service.hpp
示例3: async_resolve
void async_resolve(implementation_type& impl, const query_type& query,
Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
typedef winrt_resolve_op<Protocol, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
p.p = new (p.v) op(query, handler, io_ex);
ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "resolver", &impl, 0, "async_resolve"));
(void)impl;
try
{
using namespace Windows::Networking::Sockets;
async_manager_.async(DatagramSocket::GetEndpointPairsAsync(
winrt_utils::host_name(query.host_name()),
winrt_utils::string(query.service_name())), p.p);
p.v = p.p = 0;
}
catch (Platform::Exception^ e)
{
p.p->ec_ = asio::error_code(
e->HResult, asio::system_category());
scheduler_.post_immediate_completion(p.p, is_continuation);
p.v = p.p = 0;
}
}
开发者ID:DitansKing,项目名称:asio,代码行数:32,代码来源:winrt_resolver_service.hpp
示例4: resolve
// Resolve a query to a list of entries.
iterator_type resolve(implementation_type&, const query_type& query,
asio::error_code& ec)
{
asio::detail::addrinfo_type* address_info = 0;
socket_ops::getaddrinfo(query.host_name().c_str(),
query.service_name().c_str(), query.hints(), &address_info, ec);
auto_addrinfo auto_address_info(address_info);
return ec ? iterator_type() : iterator_type::create(
address_info, query.host_name(), query.service_name());
}
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:13,代码来源:resolver_service.hpp
注:本文中的query_type类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论