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