Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cancel libcurl easy handle

Is there an easy way to cancel a curl_easy_perform from another thread?

like image 337
Lodle Avatar asked Oct 25 '08 01:10

Lodle


1 Answers

You have to use the callback functions (write/read/progress) to perform the cancel. The other thread needs to set a flag and the callback function checks the flag and returns the proper value to cancel the operation.

like image 102
robottobor Avatar answered Sep 30 '22 04:09

robottobor