curl-library
Re: ares question
Date: Fri, 21 Oct 2005 11:28:14 -0700
I think ares_gethostbyname is a non-blocking call, so the entries in the
log would typically be sequential in your example.
Jason
Michael Mastroianni wrote:
>I should probably be posting to the ares list, but I haven't seen any
>mail from it, and can't view the archives, so I'll try here.
>
>My situation is that I am using libcurl-7.14.1 and c-ares-1.3.0 on
>various linux and windows platforms. I have a lot of threads running at
>once using the easy interface (for various reasons, multi won't work for
>me). I noticed that when I switched from libcurl-7.11.3 and whatever old
>version of ares I used to be using, that I got a _lot_ more dns timeouts
>(on some machines, half). So I tried doing the following in hostares.c
>
> /* areschannel is already setup in the Curl_open() function */
> start = tickCount();
>
> fprintf(stderr, "%ld %s %s \n",
> (long)start,
> hostname,
> "ares_gethostbyname enter:");
>
> ares_gethostbyname(data->state.areschannel, hostname, PF_INET,
> (ares_host_callback)Curl_addrinfo4_callback,
>conn);
> end = tickCount();
> elapsed = end - start;
>
> fprintf(stderr, "%ld %s %s %s %ld \n",
> (long)end,
> hostname,
> "ares_gethostbyname exit:",
> ares_strerror(conn->async.status),
> (long)elapsed);
>
>The weird thing is that they seem to be synchronized, ie, if the first
>one is snooglebar.aardvark.com, so is the next one, _always_. I would
>expect to see some interleaving in stderr, ie, snooglebar.aardvark.com
>starts and whatever.something.com ends.
>
>Any comments on this?
>
>Thanks for any help.
>
>
>
>
>
>
>
>
-- Jason Pump Senior Search Engineer Healthline 660 Third Street, Ste. 100 San Francisco, CA 94107 direct dial 415.281.3133 cell 510.812.1784 www.healthline.comReceived on 2005-10-21