Understanding Trivial FTP

Giganews Newsgroups
Subject: Understanding Trivial FTP
Posted by:  Andrew (aacg…@gmail.com)
Date: Mon, 4 Dec 2006

Hi:

Sorry last e-mails, i was wrong about behavior of TIdTrivialFTP and TIdTrivialFTPServer. Now, i really understand how they work. Only a question: Why the difference of data transference between TIdTrivialFTP (client) and TIdTrivialFTPServer (server) ???
I mean:
- Server do "LBuf := ReadStringFromStream( FStream,FUDPClient.BufferSize - hdrsize);" for loadind data to send (in listening thread execute method).
- Client do "DestinationStream.WriteBuffer(s[5], DataLen);" to save data received (in get method).
- Server do "WriteStringToStream(FStream, Copy(Buffer,hdrsize+1, Length(Buffer)-hdrsize));" to save data received (in listenig thread execute method).
- Client do "SourceStream.ReadBuffer(CurrentDataBlk[hdrsize+1], DataLen);" for loading data to send (in put method).

Please, help me understand behavior of trivial ftp components, it's important to me
Thanx a lot
Andrew

Replies