cURL / Mailing Lists / curl-library / Single Mail


curl_multi_timeout vs CURLMOPT_TIMERFUNCTION

From: Nathan E. Moore <>
Date: Sat, 17 Nov 2007 05:26:38 -0500

The timeouts provided by curl_multi_timeout and CURLMOPT_TIMERFUNCTION do
not always match. Sometimes multi_timeout will return 0, indicating that an
immediate call to socket_all is wanted, however this value is never
reported from the callback. I am also seeing a timeout of 299 from the
function, but not from the callback. However, most of the time they match.

I am looking for a little clarification if I use the callback, do I still
need to handle the 0 case? Are these differences caused by going too long
without calling a socket_* function (not giving the callback a chance to
update?)? This last idea seems suspect to me since the only thing my test
code does between calls to poll is remove completed easy handles from the
multi stack.

I am using 7.16.4, but there don't appear to be any major changes to
multi.c between then and now

Thanks for the help
Nathan E. Moore
Received on 2007-11-17