On Thu, 19 Aug 2010, Paul Harris wrote:

300000 milliseconds is 300 seconds which is 5 minutes and I believe that is indeed the timeout libcurl uses for connects by default so yes, curl_multi_timeout() will return that when it has reached the phase where it waits for the connect to complete. Why is that a problem?

Ok then.... 5 minutes seems like a long time to me, if a website doesn't
respond in 1 minute, I usually assume even if it would respond, any proxy in
between might time the connection out anyway.

Well, you get libcurl's timeout there, you can of course limit that further at your own choice.

Starting with the next release, the *TIMEOUT options will even work so that they will help shortening the timeout value returned there.

Could you satisfy my curiousity: What is the reason for using milliseconds, when everything else seems to use microseconds?

Everything else, really? In my recollection POSIX has functions with nanoseconds (like nanosleep()), microseconds (like select()), milliseconds (like poll()) and seconds (like sleep()) for various timeouts.

In libcurl we use milliseconds quite consistently I believe for sub second resolution in the API.

I picked milliseconds back in the days since I think it makes sense to provide sub second resolution. I don't think any application so far has shown a need for sub millisecond resolution.

--

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

Reply via email to