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

www.cryer.info
Managed Newsgroup Archive

Re: idftp server with large files

Subject:Re: idftp server with large files
Posted by:"API" (ari.pikivir..@kolumbus.fi)
Date:Mon, 26 Feb 2007 11:44:49

As some more info, i tried to find something from the idftpserver component

        if Assigned(LStream) then begin
          LStream.Position := FRESTPos;
          FRESTPos := 0;
          FDataChannelThread.Data := LStream;
          FDataChannelThread.OKReply.SetReply(226, RSFTPDataConnClosed);
          FDataChannelThread.ErrorReply.SetReply(426,
RSFTPDataConnClosedAbnormally);

, but there seemed to be nothing that would cause such..
anyway - as more info i got that the client replies on those files 426 error
code.

/API

> 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:

In response to:

www.cryer.info
Managed Newsgroup Archive