1curl_multi_fdset(3)             libcurl Manual             curl_multi_fdset(3)
2
3
4

NAME

6       curl_multi_fdset  -  extracts  file descriptor information from a multi
7       handle
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLMcode curl_multi_fdset(CURLM *multi_handle,
13                                  fd_set *read_fd_set,
14                                  fd_set *write_fd_set,
15                                  fd_set *exc_fd_set,
16                                  int *max_fd);
17

DESCRIPTION

19       This  function  extracts  file  descriptor  information  from  a  given
20       multi_handle.  libcurl returns its fd_set sets. The application can use
21       these to select() on, but be sure to FD_ZERO them before  calling  this
22       function  as  curl_multi_fdset(3)  only  adds  its  own descriptors, it
23       doesn't zero or otherwise remove any others. The  curl_multi_perform(3)
24       function  should  be  called as soon as one of them is ready to be read
25       from or written to.
26
27       If no file descriptors are set by libcurl, max_fd will contain -1  when
28       this  function returns. Otherwise it will contain the higher descriptor
29       number libcurl set.
30
31       You should also be aware that when doing select(), you should  consider
32       using  a rather small (single-digit number of seconds) timeout and call
33       curl_multi_perform regularly - even if no activity has been seen on the
34       fd_sets  -  as  otherwise libcurl-internal retries and timeouts may not
35       work as you'd think and want.
36
37       Starting with libcurl 7.16.0, you should use curl_multi_timeout to fig‐
38       ure out how long to wait for action.
39

RETURN VALUE

41       CURLMcode  type,  general  libcurl  multi  interface  error  code.  See
42       libcurl-errors(3)
43

SEE ALSO

45       curl_multi_cleanup(3),curl_multi_init(3), curl_multi_timeout(3)
46
47
48
49libcurl 7.16.0                    2 Jan 2006               curl_multi_fdset(3)
Impressum