22 #ifndef NDN_CXX_NET_DNS_HPP
23 #define NDN_CXX_NET_DNS_HPP
28 #include <boost/asio/ip/address.hpp>
50 return address.is_v4();
59 return address.is_v6();
63 class Error :
public std::runtime_error
66 using std::runtime_error::runtime_error;
92 boost::asio::io_service& ioService,
109 boost::asio::io_service& ioService,
boost::asio::ip::address IpAddress
void asyncResolve(const std::string &host, const SuccessCallback &onSuccess, const ErrorCallback &onError, boost::asio::io_service &ioService, const AddressSelector &addressSelector, time::nanoseconds timeout)
Asynchronously resolve host.
function< void(const IpAddress &address)> SuccessCallback
function< bool(const IpAddress &address)> AddressSelector
function< void(const std::string &reason)> ErrorCallback
IpAddress syncResolve(const std::string &host, boost::asio::io_service &ioService, const AddressSelector &addressSelector)
Synchronously resolve host.
boost::chrono::nanoseconds nanoseconds
bool operator()(const IpAddress &address) const
bool operator()(const IpAddress &address) const
bool operator()(const IpAddress &address) const