curl-library
timeout in milliseconds doesn't seem to work
Date: Fri, 1 May 2009 17:32:51 -0400
Hey all,
I'm trying to set a timeout in milliseconds and it doesn't seem to be
working. Here's the version info:
libcurl/7.19.4 OpenSSL/0.9.7l zlib/1.2.3 c-ares/1.6.0
I'm running on Leopard. I've also tried it on CentOS with no luck.
Here is what I'm basically doing.
init an easy handle
set the url
set the method to get
curl_easy_setopt(easy_handle, 155, 500); // for say 500 ms timeout.
where 155 is the CURLOPT_TIMEOUT_MS value
What I'm finding is that it automatically rounds up to the nearest
second. So it's really only doing full second timeouts. So a ms value
of 1001 would actually do timeouts at 2 seconds. I saw that I need to
have it built with c-ares and based on the version returned by
curl_version, I think I do.
Is there something else that I'm missing?
Thanks,
Paul
Received on 2009-05-01