curl\_multi\_socket\_all(3) Library Functions Manual curl\_multi\_socket\_all(3)

# [NAME](#NAME)

curl\_multi\_socket\_all - reads/writes available data for all easy handles

# [SYNOPSIS](#SYNOPSIS)

```
#include <curl/curl.h>
CURLMcode curl_multi_socket_all(CURLM *multi_handle,


                                int *running_handles);
```

# [DESCRIPTION](#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)*](/man/os/curl/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 a single one by calling [*curl\_multi\_socket\_all(3)*](/man/os/curl/curl_multi_socket_all.3). Note that there should not be any reason to use this function.

# [PROTOCOLS](#PROTOCOLS)

This functionality affects all supported protocols

# [EXAMPLE](#EXAMPLE)

```
int main(void)
{


  int running;


  int rc;


  CURLM *multi = curl_multi_init();


  rc = curl_multi_socket_all(multi, &running);
}
```

# [AVAILABILITY](#AVAILABILITY)

Added in curl 7.15.4

# [RETURN VALUE](#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)*](/man/os/curl/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.

# [SEE ALSO](#SEE_ALSO)

[**curl\_multi\_cleanup**(3)](/man/os/curl/curl_multi_cleanup.3), [**curl\_multi\_fdset**(3)](/man/os/curl/curl_multi_fdset.3), [**curl\_multi\_info\_read**(3)](/man/os/curl/curl_multi_info_read.3), [**curl\_multi\_init**(3)](/man/os/curl/curl_multi_init.3), **the**hiperfifo.c**example**

2026-09-24 libcurl

---

Document: curl_multi_socket_all(3) from curl 8.22.0-r3 (Chainguard OS)
Source: https://github.com/curl/curl.git
