Back to product page

StateChange method

Called when wodSSHTunnel changes its state.




  • Basic
object.StateChange  Owner, OldState
The StateChange(object,Owner,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.
OldStateRequired. A StatesEnum enumeration, as described in settings. Holds previous state.


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 StateChange notification method is called each time wodSSHTunnel's internal state changes (with regard to its connection with the SSH server). Initially it is set to Disconnected. Once you initiate a new connection, it will change to Connecting, etc.. Using this notification method you can determine whether there is anything happening with wodSSHTunnel. You can access the current state using the State property.