Classes | |
| struct | AnyAddress |
| class | Error |
| struct | Ipv4Only |
| struct | Ipv6Only |
Typedefs | |
| typedef function< bool(const IpAddress &address)> | AddressSelector |
| typedef function< void(const std::string &reason)> | ErrorCallback |
| typedef boost::asio::ip::address | IpAddress |
| typedef function< void(const IpAddress &address)> | SuccessCallback |
Functions | |
| void | asyncResolve (const std::string &host, const SuccessCallback &onSuccess, const ErrorCallback &onError, boost::asio::io_service &ioService, const AddressSelector &addressSelector=AnyAddress(), time::nanoseconds timeout=4_s) |
| Asynchronously resolve host. More... | |
| IpAddress | syncResolve (const std::string &host, boost::asio::io_service &ioService, const AddressSelector &addressSelector=AnyAddress()) |
| Synchronously resolve host. More... | |
| typedef function<bool (const IpAddress& address)> ndn::dns::AddressSelector |
| typedef function<void (const std::string& reason)> ndn::dns::ErrorCallback |
| typedef boost::asio::ip::address ndn::dns::IpAddress |
| typedef function<void (const IpAddress& address)> ndn::dns::SuccessCallback |
| void ndn::dns::asyncResolve | ( | const std::string & | host, |
| const SuccessCallback & | onSuccess, | ||
| const ErrorCallback & | onError, | ||
| boost::asio::io_service & | ioService, | ||
| const AddressSelector & | addressSelector = AnyAddress(), |
||
| time::nanoseconds | timeout = 4_s |
||
| ) |
Asynchronously resolve host.
If an address selector predicate is specified, then each resolved IP address is checked against the predicate.
Available address selector predicates:
ioService keeps running and onSuccess is invoked at a later time. This could cause segmentation fault if onSuccess is deallocated. To stop the io_service, explicitly invoke ioService.stop(). | IpAddress ndn::dns::syncResolve | ( | const std::string & | host, |
| boost::asio::io_service & | ioService, | ||
| const AddressSelector & | addressSelector = AnyAddress() |
||
| ) |