curl-library
Re: Select call of libcurl returns without connecting
Date: Thu, 10 Dec 2009 11:56:07 +0100 (CET)
On Wed, 9 Dec 2009, centrio_at_gmail.com wrote:
> The setup in which I am working is this way.
> I have a proxy through which I connect to internet. say
> proxy: 192.168.20.1
> default gateway 192.168.20.2
>
> I have an entry in my route to an external server as follows
> 193.88.125.20 mask 255.255.255.255 gw 192.168.20.1 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 193.88.125.20,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.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-12-10