Boost logo

Boost :

Subject: [boost] boost::asio and resolve_async
From: david.hagood_at_[hidden]
Date: 2012-08-16 10:35:54


I was looking at needing to do a large number of reverse DNS lookups for a
log analysis program I am writing, and wanted to use some form of async
lookup to speed the program up (vs. doing each look up in series, at a
couple of seconds per lookup).

boost::asio and the async_resolve functions looked to be just what I
wanted, BUT: I can find no good examples of a simple lookup. By "simple" I
mean "given an address, give me the host name(s) associated with that
address". All the examples were for a lookup by host name/transport
type/port, e.g. host name/tcp/80. In my case I neither need a port # nor
even have one - I just want the RDNS for the address.

It seems to me the documentation in the boost::asio is a bit light on the
various types for resolver queries, endpoint types, and such - and seems
to be more focused on TCP and UDP than generic IP.

Are there any better examples out there of RDNS using boost::asio?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk