cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Resume transfer question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 16 Aug 2002 14:20:27 +0200 (MET DST)

On Fri, 16 Aug 2002, Stanislav Samolenkov wrote:

> It's uneasy that libcurl doesn't perform transfer resuming just inside
> itself.

libcurl CANNOT possibly know or guess that you want to resume the file. You
need to tell it to.

> The task is to be carried on by outer code. Upon receiving termination code
> returned by curl_easy_perform() one should decide retry transfer or abort.

Well, weather it "should" of course depends on what the client program wants
to do, it sure "could" do it.

> Please, advice - which of the errors (CURLcode) may be considered as making
> retry resonable? Which of except CURLE_PARTIAL_FILE?

If the transfer of a file fails, yes then you decide if it should retry or
not. I really can't tell you on what grounds your pogram should retry on. It
really depends on lots of factors.

> Suppose transfer interrupted by remote system and I got CURLE_PARTIAL_FILE.
> If I start resume transfer I can encounter another error like
> CURLE_COULDNT_CONNECT that may mean remote system died or FTP server
> process died.

Indeed.

> So it is resonable to retry transfer in some time (10-30 sec, suppose).

Possibly. Unless of course the machine was taken down for maintenance and is
gone for 2 months and then it comes back and you can still resume the
download if you want to.

> There may be also other errors kind of CURLE_COULDNT_CONNECT. What are
> they?

Are you talking about other reasons in the other end or places in the source
code that can return this return code?

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-08-16