Back to product page

StateChanged event


Fires when user's state changes.

Syntax

  • Basic
Private Sub object_StateChanged(User, NewState, OldState)
The StateChanged(object,User,NewState,OldState) syntax has these parts:
objectAn expression evaluating to an object of type wodFTPD.
UserA FtpUser object. Reference to user whose state has changed.
NewStateA StatesEnum enumeration, as described in settings. Represents new state.
OldStateA StatesEnum enumeration, as described in settings. Represents previous state.

Remarks

StateChanged event is fired each time user's state changes. Depending on values provided by this event, you can track down user's behavior on your system, deny access to it, or just store it locally for debugging purposes.

The settings for NewState and OldState are:
Constant Value Description
Disconnected0 Disconnected from server.
Connecting 1 Connecting to server.
Encrypting2 Initializing secure connection.
LogonInProgress 3 Receiving authentication data.
Connected4 Connected - idle.
SettingDataChannel 5 Setting data channel.
ConnectingDataChannel6 Connecting data channel.
Listing 17 Listing directory contents.
Downloading18 Downloading file from the server.
Uploading 19 Uploading file to the server.

Platforms

Windows