Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2006-01-13 10:55:25


On 1/13/06, Tompa <tompa1969_at_[hidden]> wrote:
>
> Christopher Kohlhoff <chris <at> kohlhoff.com> writes:
> > Using gethostbyname on Windows, for example, also
> > resolves NetBIOS names, and asio should provide identical
> > behaviour to the platform's own host resolution functions.
>
> Please take note that the gethostbyname function has been deprecated by
> the
> introduction of the getaddrinfo function on the Windows platform!

I believe getaddrinfo is the preferred method on all IPv6-capable
platforms. The code in the boost-review version of asio is using
gethostby{name|addr} but I think this part of the code may be re-worked in
light of various threads I've seen on this list.

I have not checked into your code, but what is Asio's default mechanism for
> resolving hostnames - will it spawn and asynchronously use a new thread or
> will
> it resolve the hostname synchronously in main thread?

The asio host_resolver can be used either synchronously or asynchronously.
In the latter case, resolver calls are handled by a background thread.

--
Caleb Epstein
caleb dot epstein at gmail dot com

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