cURL / Mailing Lists / curl-library / Single Mail


Re: multihomed connections

From: Daniel Stenberg <>
Date: Thu, 10 Jun 2004 13:04:39 +0200 (CEST)

On Wed, 9 Jun 2004, Gisle Vanem wrote:

> > * trying * Connection refused
> > * trying * Connection refused
> Did that,

I like it. Nice work!

I just have some minor cosmetic comments:

1. Since these strings are passed to a debug callback as well, we cannot do
too many assumptions on how they will appear to users, I mean apart from how
the curl tool shows them. We can in fact make curl use a debug callback and
precent it from outputting that second astersisk, if we really think that its
worth the effort.

2. On my ipv6-enabled Linux host, I got some funny output on that host
   (indeed a good test host name!), see this snippet:

* About to connect() to port 80
* Trying * Success
* Trying * Success
* Trying * Success
* Trying * Success
* Trying * Success
* Trying * Success
* Trying * Success
* Closing connection #0
curl: (7) couldn't connect

The good news is that I found the two problems that caused this -
verifyconnect() was called twice and the second time it always got error 0.
But even with this fix I still got Success on the 10.* addresses, which turned
out to be because I get a timeout on those connects and then error is 0 too.

With these edits, I committed!

> And this too, but the prototype is
> const char *Curl_printable_address (const Curl_ipconnect*, char*, size_t);
> Now moved to hostip.c

Thumbs up from me!

> Hopefully Curl_connecthost() is now easier to follow. IMHO we should make a
> more generic Curl_ipconnect. For IPv6, getaddrinfo() does the tidbits of
> filling the port and addr-type. Why can't we do this ourselves in hostip4.c
> or hostares.c so we don't need to fill the serv_addr again in
> Curl_connecthost and then url.c.

I agree completely. It would make sense to have all resolvers provide a
getaddrinfo()-style result with a linked list of data to use.

     Daniel Stenberg -- --
      Dedicated custom curl help for hire:
Received on 2004-06-10