cURL / Mailing Lists / curl-library / Single Mail


Re: using curl_easy_pause()

From: Hrishikesh Murukkathampoondi <>
Date: Thu, 5 Aug 2010 17:08:21 +0530

On 05-Aug-2010, at 4:52 PM, Hrishikesh Murukkathampoondi wrote:

> I read through the libcurl-tutorial and I am able to set up a handle, options, and call curl_easy_perform() to download a file. But I do not understand how I can use curl_easy_pause() to pause the download.
> In my application I spawn a separate thread that uses lib-curl to download this file so I initially thought I can call easy_pause from the main thread. But the documentation at says that the function should not be called from another thread.
> The call to curl_easy_perform() will not return till the download is complete so I cannot call curl_easy_pause() from the same thread.
> I am missing something/ Could someone tell me the correct way to use curl_easy_pause()?
> Thank you
> Hrishi

I think answers my question.

curl_easy_pause() should be called from one of the callback functions. I guess the CURL handle should be packaged as an argument into the callback function somehow.

List admin:
Received on 2010-08-05