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 http://curl.haxx.se/libcurl/c/curl_easy_pause.html 
> 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 
http://article.gmane.org/gmane.comp.web.curl.library/17141/match=curl%5feasy%5fpause
 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.

Hrishi
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to