Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Understanding FTP Server sessions



Permlink Replies: 3 - Last Post: Oct 28, 2016 6:13 PM Last Post By: Remy Lebeau (Te...
Colin Maharaj

Posts: 122
Registered: 12/2/99
Understanding FTP Server sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 1:48 PM
In the login process there is an ASender property like this.....

IdFTPServer1UserLogin(TIdFTPServerContext *ASender.......

and

In the logout process there is an AContext like this......

IdFTPServer1Disconnect(TIdContext *AContext)........

So, how do I link a particular FTP session from start to finish.
I may want to track this some where.

Thanks
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Understanding FTP Server sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 2:20 PM   in response to: Colin Maharaj in response to: Colin Maharaj
Colin wrote:

In the login process there is an ASender property like this.....

IdFTPServer1UserLogin(TIdFTPServerContext *ASender.......

and

In the logout process there is an AContext like this......

There is no "logout" in the FTP protocol. Once a user is logged in, it stays
logged in until the socket connection is closed.

IdFTPServer1Disconnect(TIdContext *AContext)........

OnUserLogin is a FTP-specific event, so it knows about FTP-specific context
objects.

OnDisconnect is inherited from TIdCustomTCPServer, so it only knows about
generic context objects.

So, how do I link a particular FTP session from start to finish.
I may want to track this some where.

All TIdContext objects in TIdFTPServer are TIdFTPServerContext objects.
TIdFTPServerContext derives from TIdContext, so you can simply type-cast
ASender to TIdFTPServerContext in the OnDisconnect and other inherited events.

--
Remy Lebeau (TeamB)
Colin Maharaj

Posts: 122
Registered: 12/2/99
Re: Understanding FTP Server sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 4:27 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Very well thanks once more....
Remy is there anyway I can contact you directly....

On 28/10/2016 05:20 PM, Remy Lebeau (TeamB) wrote:

All TIdContext objects in TIdFTPServer are TIdFTPServerContext objects.
TIdFTPServerContext derives from TIdContext, so you can simply type-cast
ASender to TIdFTPServerContext in the OnDisconnect and other inherited events.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Understanding FTP Server sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 6:13 PM   in response to: Colin Maharaj in response to: Colin Maharaj
Colin wrote:

Remy is there anyway I can contact you directly....

http://www.lebeausoftware.org

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02