Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Mar : Re: IdFTP.InitDataChannel
| Subject: | Re: IdFTP.InitDataChannel |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 5 Mar 2008 10:36:51 |
"Alexe Bilchenko" <alexei.bilchenko@impet.com> wrote in message
news:47ce72a1$1@newsgroups.borland.com...
> What do you think about replace string
> FDataChannel.IOHandler.LargeStream := True;
> to
> FDataChannel.IOHandler.LargeStream := IOHandler.LargeStream;
Why? There is no need for that change. In fact, it makes more sense to
leave it hard-coded as True. The LargeStream property is False by default.
Being able to send 64-bit streams has become more and more important in
recent years. Rather than forcing the user to remember to enable the
property in the main component and have it propagate to the data data
connection, it is easier to just hard-code the data connection instead.
There is no ill effect to having it set to True always, since TIdFTP does
not have Write(TStream) and ReadStream() write/read the stream size. But it
does have the benefit of allows Write(TStream) to accept both 32-bit and
64-bit streams equally regardless of the platform being used. If your
proposed change was made, and the user forgot to set
TIdFTP.IOHandler.LargeStream to True, then 64-bit files could not be
transferred correctly.
> Same as FDataChannel.IOHandler.RecvBufferSize :=
> IOHandler.RecvBufferSize;
TIdFTP already does that (same with SendBufferSize). If your copy is not
doing that, then you are using an older version.
> And set IOHandler.LargeStream to true by default in IdFTP if needly;
There is no reason to do that.
Gambit
none