Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Feb : Re: How to only download a part of remote file via idFTP?

www.cryer.info
Managed Newsgroup Archive

Re: How to only download a part of remote file via idFTP?

Subject:Re: How to only download a part of remote file via idFTP?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 26 Feb 2007 23:13:43

"Bear" <bear@nobody.com> wrote in message
news:45e39900@newsgroups.borland.com...

> I want to download via multi threads.

Then you need to run multiple FTP connections.  A single connection
can only download 1 file at a time.

> Each download thread only download a Part via idFTP.

The FTP protocol does not support the type of fine tuning that is
required for such an operation.  You can tell a download where to
start from, but not where to end.  You would have better luck using
HTTP v1.1 instead, which supports ranged transfers.

> But idFTP will use TIdIOHandler.ReadStream:

So?  TidFTP supports downloading files beginning at a specified
offset.

> It always set the Stream Size to the Position.

As it should be.  It is making sure that the stream matches the data
that was actually transferred.

> How to avoid this?

You can't.

> Is there are feature to allow idFTP only download a part of a remote
> file to a part of a local file?

Not to the degree needed for what you are asking for.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive