cURL / Mailing Lists / curl-library / Single Mail


Re: Select call of libcurl returns without connecting

From: Daniel Stenberg <>
Date: Thu, 10 Dec 2009 11:56:07 +0100 (CET)

On Wed, 9 Dec 2009, wrote:

> The setup in which I am working is this way.
> I have a proxy through which I connect to internet. say
> proxy:
> default gateway
> I have an entry in my route to an external server as follows
> mask gw metric 1
> I have developed an application that uses libcurl.
> I give command "set http_proxy=" and then run libcurl application.
> Now when I give a URL that represents,to my libcurl
> application, its taking more time to route I guess.

More time to route than what? On a normal LAN a single extra hop makes very
little extra time.

> But if I have connected to the internet (any URL) before connecting using
> libcurl, it connects much early.

If that extra route thing is the only difference then sure something in your
setup is slowing things down.

> Is it that libcurl request is taking more time for its first request?

If you by "first request" mean the first request on a connection that is then
subsequently kept alive and is re-used then yes the first request will then
take noticable longer time.

> I have also observed that if ther is a url ABC, then If i connect it using
> my application it does not connect immediately, but If i first run it
> through media player, internet explorer, and then try using my application,
> it works immediately. What could be the issue?

I don't know. I'd suggest running wireshark and strace to see what's going on
under the hood and compare between the faster one and the slower one.

List admin:
Received on 2009-12-10