Re: TIdFTPServer problem

Giganews Newsgroups
Subject: Re: TIdFTPServer problem
Posted by:  Remy Lebeau (TeamB) (
Date: Fri, 12 Nov 2004

"Khash Sajadi" <kha…> wrote in message

> I'm not sure if this is because the stream is real-time so its position
> is always equal to its size and therefore client is always on 100%
> progress of download and after a while throws a timeout at my face.

Your Size should never match the Position until all data has been read from
the stream.  I would suggest setting the Size to its maximum value, and then
when all of the data has been sent, change the Position to be the same as
the Size.

The other problem you are going to have on your server is if the client ever
issues a SIZE command.  You have to return the file's true size.  IF you do
not know the true size, then you are in trouble.

Why can't you know the file's true size?  Don't you know the true size of
the other files that you are combining together?  Are you just appending the
files together as-is, or are you taking bits and pieces out of each of the
files?  If appending as-is, then just add the various file sizes together to
get the size of the data that you will be transmitting.




In response to

TIdFTPServer problem posted by Khash Sajadi on Fri, 12 Nov 2004