22 #ifndef NDN_CXX_NET_DNS_HPP
23 #define NDN_CXX_NET_DNS_HPP
28 #include <boost/asio/ip/address.hpp>
49 operator()(
const boost::asio::ip::address& address)
const
51 return address.is_v4();
58 operator()(
const boost::asio::ip::address& address)
const
60 return address.is_v6();
64 using SuccessCallback = std::function<void(
const boost::asio::ip::address& address)>;
88 boost::asio::io_context& ioCtx,
std::function< bool(const boost::asio::ip::address &)> AddressSelector
void asyncResolve(const std::string &host, const SuccessCallback &onSuccess, const ErrorCallback &onError, boost::asio::io_context &ioCtx, const AddressSelector &addressSelector, time::nanoseconds timeout)
Asynchronously resolve host.
std::function< void(const boost::asio::ip::address &address)> SuccessCallback
std::function< void(const std::string &reason)> ErrorCallback
::boost::chrono::nanoseconds nanoseconds
bool operator()(const boost::asio::ip::address &) const
bool operator()(const boost::asio::ip::address &address) const
bool operator()(const boost::asio::ip::address &address) const