Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Feb : idftp server with large files

www.cryer.info
Managed Newsgroup Archive

idftp server with large files

Subject:idftp server with large files
Posted by:"API" (ari.pikivir..@kolumbus.fi)
Date:Mon, 26 Feb 2007 09:56:13

i'm having problems sending (probably also with uploading) large files
trough the idftpserver (9.0.50). filestream size seems to be ok, but when i
start download from the client it stops with 0 bytes received - file is
created though.

code in the retrieve event:

    if fileexists( path ) then
    begin
      AutoBan_DelFirstGet( addr );
      try
        vstream:= tfilestream.Create(path, fmOpenRead, fmShareDenyWrite);
(*
        vstream:= tftp_filestream.Create(path, fmOpenRead, fmShareDenyWrite,
down);
        tftp_filestream(vstream).OnProgress:= filestream_onprogress;
        tftp_filestream(vstream).OnStop:= filestream_onstop;
*)
        vstream.Seek(int64(0),0);
        addtolog(addr+', '+asender.username+'> Download file '+afilename+'
('+bytestostr(vstream.size)+')');
      except
        raise exception.Create( 'File not available '+AFilename);
      end;
    end else

Replies:

www.cryer.info
Managed Newsgroup Archive