Hi Folks
still got problems to get my file transfer with LNET (0.6.5) and FTP running. (sorry Almindor...)
I tried to follow Almindors/your advice but I did not succeed:
Client FTP is more or less like this:
FTP.Connect; // say we specified the ip and port in
either OnError or OnConnect gets called, depending on if we connected or not.
If we connected, in the OnConnect, you should issue the authentication commands
Either OnFailure or OnSuccess will get called based on the auth result
(make sure you have the auth commands in the StatusSet property, otherwise it won't be reported)
As for sending, you should use OnCanSend as I wrote above in my previous post. Hope this helps.
According to my understanding I tried to "file transfer" as mentioned above using the FTP component.
First Event (just clicking button to start)
procedure TForm1.Button1Click(Sender: TObject);
begin
FTP.Connect('myhost.de', 21);
end;
Second event
procedure TForm1.FTPConnect(aSocket: TLSocket);
begin
FTP.Authenticate('user', 'password');
ftp.ChangeDirectory('ftptest');
end;
Third event (never fired!)
procedure TForm1.FTPSuccess(aSocket: TLSocket; const aStatus: TLFTPStatus);
begin
ftp.Binary := true;
if FTP.Put('d:\swirl\projects\ftp\apple.png') then beep;
end;
StatusSet: all checked TRUE...
I also traced FTPError and FTPFailure: never fired...
I'd be glad if anybody could help.
Regards
Mike