|
Boost : |
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-11-26 10:25:32
Hu Xinwei wrote:
> That poster was me(sorry, I dont familiar with wiki). IMHO,
> addrinfo/getaddrinof/freeaddrinfo are much better than those
> obsoleted gethostbyname.... The reasons are simple.
>
> 1. getaddrinfo is thread-safe. And not all OS provide those
> functions like gethostbyname_r
>
> 2. getaddrinfo resovle one name to multiaddresses, especially a
> name with both IPv4 addresses, and IPv6 addresses.
Just as a side note. getaddrinfo is only supported on Windows XP and
above, no 95/98/Me/NT/2000.
Markus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk