Lodle
Lodle

Reputation: 32207

Cancel libcurl easy handle

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

Upvotes: 5

Views: 2962

Answers (1)

robottobor
robottobor

Reputation: 11763

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.

Upvotes: 8

Related Questions