On Sat, Dec 26, 2009 at 3:40 PM, Daniel Stenberg <[email protected]> wrote:
> On Mon, 21 Dec 2009, Julien Chaffraix wrote:
>
>> My previous change is also quite limited to my testing and may be broader
>> (if a handle has finished, it could be in the fdset when we do not expect it
>> to be ..). What is the position of more knowledgeable people about libcURL:
>> does it sound sane to advice that curl_multi_perform should be called to be
>> sure that the curl_multi_fdset() results are up-to-date?
>
> Yes I think it is a good idea to clarify that *perform() is the key function
> that drives changes to socket states so if you want really up-to-date info
> that function should be called first.

Thanks for the reply, a new patch taking your inputs into account is
attached to this mail. I have dropped the "warning" to match the rest
of the manpages.

Regards,
Julien
diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3
index 6b0a990..1dd7fb7 100644
--- a/docs/libcurl/curl_multi_fdset.3
+++ b/docs/libcurl/curl_multi_fdset.3
@@ -21,6 +21,10 @@ but be sure to FD_ZERO them before calling this function as
 otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be
 called as soon as one of them is ready to be read from or written to.
 
+To be sure to have up-to-date results, you should call \fIcurl_multi_perform\fP
+until it does not return CURLM_CALL_MULTI_PERFORM prior to calling \fIcurl_multi_fdset\fP.
+This will make sure that libcurl has updated the handles' socket state.
+
 If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
 this function returns. Otherwise it will contain the higher descriptor number
 libcurl set.
@@ -37,5 +41,5 @@ figure out how long to wait for action.
 CURLMcode type, general libcurl multi interface error code. See
 \fIlibcurl-errors(3)\fP
 .SH "SEE ALSO"
-.BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
-.BR curl_multi_timeout "(3) "
+.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
+.BR curl_multi_timeout "(3), " curl_multi_perform "(3) "
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to