From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2006-06-04 22:06:11
Pedro Lamarão <pedro.lamarao_at_[hidden]> wrote:
> > I'm reformatting old example code, I'll try to populate
> > those pages with simpler, more to the point, example usage
> > today.
> Well, I did add _one_ new example usage to the docs, which I
> had to save from the old stuff by changing the implementation.
> The documentation is still here:
> More descriptive stuff here:
> What do the asio people think about this approach?
> I could work a patch out to put this stuff in and see
> what happens.
The post-review asio code has something quite similar which is
also called a 'resolver'. It was added to provide protocol
independence between IPv4 and IPv6, and is likewise based on
getaddrinfo() and getnameinfo(). For example:
tcp::resolver::query q("boost.org", "http");
tcp::resolver::iterator i = r.resolve(q);
while (i != end)
tcp::endpoint e = *i;
There's also a resolver::async_resolve() function.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk