cURL / Mailing Lists / curl-library / Single Mail


Re: Download Pause and Resume , curl_easy_pause

From: Dan Fandrich <>
Date: Wed, 12 Nov 2008 23:27:46 -0800

On Thu, Nov 13, 2008 at 12:38:19PM +0530, pratap k wrote:
> Thanks for help, its working. But,How can we pause and resume across multiple
> sessions(closing and reopening the application).
> Is there any facility to save current state and restoring it later (something
> like Hibernation).

As soon as you close your application, the operating system will close and
reclaim all sockets, so there's no possible way to do exactly what you
ask. Instead, at the application level, you could keep track of where in
the transfer you are and save that in some nonvolatile storage at exit,
then restore the transfer at that point with CURLOPT_RESUME_FROM_LARGE
and CURLOPT_RANGE at the next restart to continue where you left off.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-11-13