cURL / Mailing Lists / curl-library / Single Mail


Dynamically calling curl_multi_add_handle or curl_multi_remove handle on an ongoing curl_multi_perform

From: sandeep a <>
Date: Sun, 11 Dec 2011 13:02:30 +0400


I have a use case scenario in my application, where I might have to
add/remove a file to an ongoing list of files being uploaded. My question
is inline with the curl_multi_interface concept.

Having said that can I call:

 curl_multi_add_handle(easy_handle_1 for file1)
 curl_multi_add_handle(easy_handle_2 for file2)
 curl_multi_add_handle(easy_handle_3 for file3)
 curl_multi_add_handle(easy_handle_4 for file5)

Then call curl_multi_perform
Now I decide that I want to add another file, "file5" to the ongoing upload
by calling:
 curl_multi_add_handle(easy_handle_5 for file5)
or decide that, I want to cancel upload of file 3 from the already ongoing
upload, by calling..
curl_multi_remove_handle(easy_handle_3 for file3)..followed by

I would assume the precondition that, I call the
API curl_multi_add_handle(easy_handle_5 for file5)
or curl_multi_remove_handle(easy_handle_3 for file3) inside the loop
while(running tasks), to make sure that curl_multi_perform is not completed.

Can this be possible?

Thanks and Best Regards,
-Sandeep A

List admin:
Received on 2011-12-11