|Subject:||Re: Event sequense upon client disconnection|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Wed, 9 Mar 2005|
"Khash Sajadi" <kha…@btinternet.com> wrote in message
> Could someone please tell me the event firing sequence when a
> client is disconnected in the middle of the upload to a TldFTPServer?
The only event triggered is OnDisconnect, and that only triggers when
command connections are disconnected, not data transfer connections.
> I need to perform some special tasks in case the connection is
> disconnected before upload is finished. I know that OnDisconnect
> gets fired but it has a TIdPeerThread as the parameter and I'm after
> an event that gets called before that with a TIdFTPServerThread instead.
The TIdPeerThread *is* the TIdFTPServerThread. Simply cast it:
procedure TForm1.IdFTPServer1Disconnect(AThread: TIdPeerThread);
FTPThread := TIdFTPServerThread(AThread);
// use FTPThread as needed...
Event sequense upon client disconnection posted by Khash Sajadi on Wed, 9 Mar 2005