1 .\" $Id: curl_multi_fdset.3,v 1.12 2006/01/02 23:32:36 bagder Exp $
3 .TH curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
5 curl_multi_fdset - extracts file descriptor information from a multi handle
10 CURLMcode curl_multi_fdset(CURLM *multi_handle,
17 This function extracts file descriptor information from a given multi_handle.
18 libcurl returns its fd_set sets. The application can use these to select() on,
19 but be sure to FD_ZERO them before calling this function as
20 \fIcurl_multi_fdset(3)\fP only adds its own descriptors it doesn't zero or
21 otherwise remove any other. The \fIcurl_multi_perform(3)\fP function should be
22 called as soon as one of them are ready to be read from or written to.
24 If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
25 this function returns. Otherwise it will contain the higher descriptor number
28 You should also be aware that when doing select(), you should consider using a
29 rather small (single-digit number of seconds) timeout and call
30 \fIcurl_multi_perform\fP regularly - even if no activity has been seen on the
31 fd_sets - as otherwise libcurl-internal retries and timeouts may not work as
34 Starting with libcurl 7.16.0, you should use \fBcurl_multi_timeout\fP to
35 figure out how long to wait for action.
37 CURLMcode type, general libcurl multi interface error code. See
38 \fIlibcurl-errors(3)\fP
40 .BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
41 .BR curl_multi_timeout "(3) "