blob: 5428b9786be5ca4adb5380b9da482904630e80c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: curl_multi_socket_all
Section: 3
Source: libcurl
See-also:
- curl_multi_cleanup (3)
- curl_multi_fdset (3)
- curl_multi_info_read (3)
- curl_multi_init (3)
- the hiperfifo.c example
Protocol:
- All
Added-in: 7.15.4
---
# NAME
curl_multi_socket_all - reads/writes available data for all easy handles
# SYNOPSIS
~~~c
#include <curl/curl.h>
CURLMcode curl_multi_socket_all(CURLM *multi_handle,
int *running_handles);
~~~
# DESCRIPTION
This function is deprecated for performance reasons but there are no plans to
remove it from the API. Use curl_multi_socket_action(3) instead.
At return, the integer **running_handles** points to contains the number of
still running easy handles within the multi handle. When this number reaches
zero, all transfers are complete/done.
Force libcurl to (re-)check all its internal sockets and transfers instead of
just a single one by calling curl_multi_socket_all(3). Note that there should
not be any reason to use this function.
# %PROTOCOLS%
# EXAMPLE
~~~c
int main(void)
{
int running;
int rc;
CURLM *multi = curl_multi_init();
rc = curl_multi_socket_all(multi, &running);
}
~~~
# %AVAILABILITY%
# RETURN VALUE
This function returns a CURLMcode indicating success or error.
CURLM_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
The return code is for the whole multi stack. Problems still might have
occurred on individual transfers even when one of these functions return OK.
|