On Oct 19, 2009, at 4:50 AM, Chuck Anderson wrote:
getaddrinfo() doesn't maintain the DNS server's ordering of answers,
because it needs to sort the results for sane behavior in the face of
dual-stack servers and source-address selection.
That's just a godawful solution. The way Apple does it is better - they
try every address in parallel and keep the one that answers first.
Because the fact is that the host has no way of making the judgment the
Linux guys are attempting to have it make here - there is simply no way
to know which address is preferable without trying.