Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
curl_multi_perform(3) | Library Functions Manual | curl_multi_perform(3) |
NAME
curl_multi_perform - run all transfers until it would blockSYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
DESCRIPTION
This function performs transfers on all the added handles that need attention in a non-blocking fashion. The easy handles have previously been added to the multi handle with curl_multi_add_handle(3).PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
int still_running;
CURL *multi = curl_multi_init();
CURL *curl = curl_easy_init();
if(curl) {
curl_multi_add_handle(multi, curl);
do {
CURLMcode mc = curl_multi_perform(multi, &still_running);
if(!mc && still_running)
/* wait for activity, timeout or "nothing" */
mc = curl_multi_poll(multi, NULL, 0, 1000, NULL);
if(mc) {
fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mc);
break;
}
/* if there are still transfers, loop! */
} while(still_running);
}
}
AVAILABILITY
Added in curl 7.9.6RETURN VALUE
CURLMcode type, general libcurl multi interface error code.TYPICAL USAGE
Most applications use curl_multi_poll(3) to make libcurl wait for activity on any of the ongoing transfers. As soon as one or more file descriptor has activity or the function times out, the application calls curl_multi_perform(3).SEE ALSO
curl_multi_add_handle(3), curl_multi_cleanup(3), curl_multi_fdset(3), curl_multi_info_read(3), curl_multi_init(3), curl_multi_wait(3), libcurl-errors(3)2024-11-23 | libcurl |