>  > 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.

yes thats true!

The implementation should use gethostbyname if getaddrinfo is not supported.
Actually its supported on some later service packs. And I guess the
implementation would have to resort to finding the existence og getaddrinfo
dynamically (via LoadLibrary and GetProcAddress on ws2_32.dll) and resort to
gethostbyname if it's not found. gethostbyname is thread safe in winsock as
one structure is allocated per thread. I don't know about the support for
getaddrinfo on other platforms or the existence of threadsafe versions.

Regards
/Michel

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to