Hi,
I am running TFTPServer (Delphi Seattle) on a machine that is visible to FtpClients across the WAN (port forwarding). I have used the OnPasvIpAddr event to set APasvIpAddr to the public IP. This works fine for one send from my FtpClient (one send from FtpClient involves few other operations like GetFileSize , PUT & RenameFile). During the second Send the Clients gets error at the Rename. Kindly note that I connect from client only once for both the Sends.
Using FileZilla FTP Server (with setting external IP) client works fine.
TFTPServer works fine too on LAN and on a machine with Public IP machine (VPS).
Please advice the correct way to use PasvIpAddr.
procedure Tform_FtpServer.FtpServer1PasvIpAddr(Sender: TObject;Client: TFtpCtrlSocket; var APasvIpAddr: TFtpString;var SetPasvIpAddr: Boolean);
begin
if (sysPasvAddress='') then exit ; // sysPasvAddress = my variable suggesting that external address is required
SetPasvIpAddr:=True ;
APasvIpAddr:=sysPasvAddress ;
end;
Regards
Allan