Back to product page

UserStateChange method


Called when user's state changes.

Type

None

Syntax

  • Basic
object.UserStateChange  Owner, Chan, User, OldState/i>
The UserStateChange(object,Owner,Chan,User,OldState) syntax has these parts:
objectAn expression evaluating to an object of type wodTunnelNotify.
OwnerRequired. A wodTunnelCom object. Reference to the wodTunnelCom instance that called this notification method.
ChanRequired. A Channel object. Reference to the channel that was started.
UserRequired. An User object. Reference to the user that connected.
OldStateRequired. A StatesEnum enumeration, as described in settings. Holds previous state.

Remarks

The settings for OldState are:

Constant Value Description
Disconnected0 Disconnected from server.
Connecting 1 Connecting to server.
Connected 2 Connected to server - idle.
Receiving 3 Receiving data from server.
Sending 4 Sending data to server.


This method is called only if you have implemented the IwodSSHTunnelNotify interface in your application and the wodTunnel1.Notification property has received a reference to an instance of your implementation. The UserStateChange notification method is called when state changes for the user. It will be called, for example, when user starts sending data, receives data etc.. Since wodSSHTunnel component is unable to determine exact time where data is no longer received/sent (i.e. user pauses his transfer), state will revert to Connected-Idle after approx. 3 seconds of last state change.

Platforms

Windows