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

NAME

6       curl_multi_wait - polls on all easy handles in a multi handle
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLMcode curl_multi_wait(CURLM *multi_handle,
12                                 struct curl_waitfd extra_fds[],
13                                 unsigned int extra_nfds,
14                                 int timeout_ms,
15                                 int *numfds);
16

DESCRIPTION

18       This  function polls on all file descriptors used by the curl easy han‐
19       dles contained in the given multi handle  set.   It  will  block  until
20       activity  is  detected on at least one of the handles or timeout_ms has
21       passed.  Alternatively, if the multi  handle  has  a  pending  internal
22       timeout  that  has  a shorter expiry time than timeout_ms, that shorter
23       time will be used instead to make sure timeout accuracy  is  reasonably
24       kept.
25
26       The  calling  application  may  pass  additional curl_waitfd structures
27       which are similar to poll(2)'s pollfd structure to be waited on in  the
28       same call.
29
30       On  completion,  if  numfds  is supplied, it will be populated with the
31       number of file descriptors on which interesting events occured.
32
33       If no extra file descriptors are  provided  and  libcurl  has  no  file
34       descriptor to offer to wait for, this function will return immediately.
35
36       This  function is encouraged to be used instead of select(3) when using
37       the multi interface to allow applications to easier circumvent the com‐
38       mon problem with 1024 maximum file descriptors.
39

curl_waitfd

41       struct curl_waitfd {
42         curl_socket_t fd;
43         short events;
44         short revents;
45       };
46
47       CURL_WAIT_POLLIN
48              Bit flag to curl_waitfd.events indicating the socket should poll
49              on read events such as new data received.
50
51       CURL_WAIT_POLLPRI
52              Bit flag to curl_waitfd.events indicating the socket should poll
53              on high priority read events such as out of band data.
54
55       CURL_WAIT_POLLOUT
56              Bit flag to curl_waitfd.events indicating the socket should poll
57              on write events such as the socket being clear to write  without
58              blocking.
59

RETURN VALUE

61       CURLMcode  type,  general  libcurl  multi  interface  error  code.  See
62       libcurl-errors(3)
63

AVAILABILITY

65       This function was added in libcurl 7.28.0.
66

SEE ALSO

68       curl_multi_fdset(3), curl_multi_perform(3)
69
70
71
72libcurl 7.28.0                    12 Jul 2012               curl_multi_wait(3)
Impressum