cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] pausing a transfer, take one

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 20 Dec 2007 20:11:58 +0100 (CET)

On Wed, 19 Dec 2007, Immanuel Gregoire wrote:

>> I've written up a lil' patch that introduces support for pausing libcurl
>> transfers. The pausing can be done with curl_easy_pause() or by returning
>> the magic return code from the read or write callbacks. See details in the
>> curl_easy_pause.3 man page which is incluced in the patch.
>
> I'm not really sure i understand what curl_easy_pause() is intended for, but
> i'm wondering: how can you call it when curl_easy_perform() has not returned
> yet ?

First, this function works fine in the multi interface too so it isn't only
for the easy interface.

Then, there's a range of callbacks that libcurl will or can call, and you can
call curl_easy_pause() from any or all of those, depending on your
application. I've used the progress callback in my test applications when I've
tested this feature.

If you have a need to pause a transfer, I figure you should also be able to
figure out how to unpause it! ;-)

-- 
   Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-12-20