table of contents
- bullseye 7.74.0-1.3+deb11u7
- bullseye-backports 7.88.1-7~bpo11+2
- testing 7.88.1-9
- unstable 7.88.1-10
- experimental 8.0.1-1~exp1
curl_multi_cleanup(3) | libcurl Manual | curl_multi_cleanup(3) |
NAME¶
curl_multi_cleanup - close down a multi session
SYNOPSIS¶
#include <curl/curl.h> CURLMcode curl_multi_cleanup(CURLM *multi_handle);
DESCRIPTION¶
Cleans up and removes a whole multi stack. It does not free or touch any individual easy handles in any way - they still need to be closed individually, using the usual curl_easy_cleanup(3) way. The order of cleaning up should be:
1 - curl_multi_remove_handle(3) before any easy handles are cleaned up
2 - curl_easy_cleanup(3) can now be called independently since the easy handle is no longer connected to the multi handle
3 - curl_multi_cleanup(3) should be called when all easy handles are removed
Passing in a NULL pointer in multi_handle will make this function return CURLM_BAD_HANDLE immediately with no other action.
EXAMPLE¶
/* when the multi transfer is done ... */
/* remove all easy handles, then: */
curl_multi_cleanup(multi_handle);
AVAILABILITY¶
Added in 7.9.6
RETURN VALUE¶
CURLMcode type, general libcurl multi interface error code. On success, CURLM_OK is returned.
SEE ALSO¶
May 17, 2022 | libcurl 7.87.0 |