1curl_multi_cleanup(3) libcurl Manual curl_multi_cleanup(3)
2
3
4
6 curl_multi_cleanup - close down a multi session
7
9 #include <curl/curl.h>
10
11 CURLMcode curl_multi_cleanup(CURLM *multi_handle);
12
14 Cleans up and removes a whole multi stack. It does not free or touch
15 any individual easy handles in any way - they still need to be closed
16 individually, using the usual curl_easy_cleanup(3) way. The order of
17 cleaning up should be:
18
19 1 - curl_multi_remove_handle(3) before any easy handles are cleaned up
20
21 2 - curl_easy_cleanup(3) can now be called independently since the easy
22 handle is no longer connected to the multi handle
23
24 3 - curl_multi_cleanup(3) should be called when all easy handles are
25 removed
26
27 Passing in a NULL pointer in multi_handle will make this function re‐
28 turn CURLM_BAD_HANDLE immediately with no other action.
29
31 /* when the multi transfer is done ... */
32
33 /* remove all easy handles, then: */
34 curl_multi_cleanup(multi_handle);
35
37 Added in 7.9.6
38
40 CURLMcode type, general libcurl multi interface error code. On success,
41 CURLM_OK is returned.
42
44 curl_multi_init(3),curl_easy_cleanup(3),curl_easy_init(3)
45
46
47
48libcurl 8.0.1 January 02, 2023 curl_multi_cleanup(3)