> > 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 X
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
>There seems to be support for independent resolution, proposed as a
>getaddrinfo wrapper for hostname+service resolution, or by Michel's
>ip_resolver class for hostname resolution.
>Which other protocols can use name resolution?
>There is also a strong push for unified ip4, ip6 address class.
>M