It seems there is a bug using Sock.SendMaxChunk property.

After FTP instance creating, to allow OnStatus event fireing ond upload not 
only after 64KB sent buffer nut soon (dialup upload is maximum 2.5 kb/s in 
56Kbit/s modems),  forced  FTP.Sock.SendMaxChunk:=512. 
However, it ignore it and fire OnStatus event after default 64KB uffer is 
sent.

  FTP:=TFTPSend.Create;
  ...
  FTP.Sock.SendMaxChunk:=512;

  FTP.BinaryMode:=true;
  FTP.DirectFileName := FileNameEdit1.Text;
  FTP.DirectFile:=True;
  FTP.StoreFile(ExtractFileName(FileNameEdit1.Text), Resumed) 

Log:

2007-02-17 20:57:12 : > STOR ftpdemo
2007-02-17 20:57:12 : < 150 Opening BINARY mode data connection for ftpdemo
HR_CanRead 
HR_Accept 
HR_SocketClose 
HR_WriteCount 65536
HR_WriteCount 65536

Have no time for debuging, however it is located in method  
TTCPBlockSocket.SendBuffer, line r := FSSL.SendBuffer(p, y). 
Length in y (which should be 512) is probably reset to 64KB,
since OnStatus event fires on each 64KB (on large file upload).

Sasa
--
www.szutils.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to