cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_multi_fdset ambiguity

From: vick <vijayx_at_gmail.com>
Date: Mon, 25 Jan 2010 18:05:33 +0530

from the documentation on curl_multi_fdset :-

"You should also be aware that when doing select(), you should consider
using a rather small (single-digit number of seconds) timeout and call
curl_multi_performregularly - even if no activity has been seen on the
fd_sets - as otherwise libcurl-internal retries and timeouts may not work as
you'd think and want.

Starting with libcurl 7.16.0, you should use curl_multi_timeout to figure
out how long to wait for action"

In the above snippet it is not clear why curl_multi_timeout should be called
at all. Suppose i see some activity (i.e, max_fd > -1), and i simply call
select with {tv.sec=0,tv.usec=0 or 1}, and sure enough if the select picks
up the fd_set, i see it otherwise i dont. In other words, why is this
multi_timeout useful? And if it is, is there a CURLOPT to set it?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-25