cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how does curl act if gethostbyname returns several addresses

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Mar 2003 16:51:48 +0100 (CET)

On Thu, 6 Mar 2003, Jörg Müller-Tolk wrote:

> Can someone tell me at hand, how curl acts in the following case:
> gethostbyname returns several addresses and the machine of the first
> address is down.
>
> Does it try the further onces or does it fail imediately?

It'll go through all the available addresses and try them one by one until it
succeeds in connecting or runs out of them.

Also, if you build libcurl ipv6-enabled, it uses getaddrinfo() and not
gethostbyname*()...

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
Received on 2003-03-06