Re: multihomed connections
Date: Thu, 10 Jun 2004 13:04:39 +0200 (CEST)
On Wed, 9 Jun 2004, Gisle Vanem wrote:
> > * trying 184.108.40.206... * Connection refused
> > * trying 220.127.116.11... * 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 home.nl host
(indeed a good test host name!), see this snippet:
* About to connect() to ubr4-ca5-0-sec.landg1.lb.home.nl port 80
* Trying 10.221.110.1... * Success
* Trying 10.243.112.1... * Success
* Trying 18.104.22.168... * Success
* Trying 22.214.171.124... * Success
* Trying 126.96.36.199... * Success
* Trying 188.8.131.52... * Success
* Trying 184.108.40.206... * 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 -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-06-10