cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: when domain lookup result has ipv6 and ipv4

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 3 Jul 2015 10:25:24 +0200

On Fri, Jul 03, 2015 at 03:33:40PM +0800, Vincent Chen wrote:
> sorry, I did not make it clear.
>
> At the first time, I connect with a host with Happy Eyeball.
> libcurl will try to use ipv6 & ipv4 connection.
> If the ipv4 connection is successfully connected.
>
> should libcurl cache ipv4 as the result.
> and not to try ipv6 at the second time?

That sounds like reasonable expected behaviour to me. What does the RFC have to
say about this?

>>> Dan

>
> 2015-07-03 13:06 GMT+08:00 Dan Fandrich <dan_at_coneharvesters.com>:
>
> On Fri, Jul 03, 2015 at 10:34:56AM +0800, Vincent Chen wrote:
> > Thanks!
> > now I need to create IPv6 & IPv4 socket for Happy Eyeball.
> >
> > One more question,
> > I found curl doesn't cache successful connection for future uses.
> > Do I need to set any options for Happy Eyeball cache?
>
> curl should cache the connections automatically for future use. Under what
> scenario is that not working for you?
>
> >>> Dan
>
> >
> > 2015-07-02 14:16 GMT+08:00 Dan Fandrich <dan_at_coneharvesters.com>:
> >
> >     On Thu, Jul 02, 2015 at 09:59:05AM +0800, Vincent Chen wrote:
> >     > I'm developing a HTTP client with multi interface and have some
> questions
> >     when
> >     > domain name look up has both IPv6 & IPv4 address
> >     >
> >     > [Question1]
> >     > I implement the opensocket call back to create socket by myself and
> >     monitor
> >     > socket event.
> >     >
> >     > and found the callback will be called twice.
> >     >
> >     > First callback is for IPv6 and the second callback is for IPv4.
> >
> >     This behaviour is called "Happy Eyeballs" and is covered by RFC6555.
> >
> >     >>> Dan
> >     -------------------------------------------------------------------
> >     List admin: http://cool.haxx.se/list/listinfo/curl-library
> >     Etiquette:  http://curl.haxx.se/mail/etiquette.html
> >
> >
>
> > -------------------------------------------------------------------
> > List admin: http://cool.haxx.se/list/listinfo/curl-library
> > Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
>

> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-07-03