Back to product page

Connected event


Fires when wodSSH connects to the remote server.

Syntax

  • Basic
Private Sub object_Connected(ErrorCode, ErrorText)
The Connected(object,ErrorCode,ErrorText) syntax has these parts:
objectA wodSSH object.
ErrorCodeAn Integer value. Error number for error that occurred, if any.
ErrorTextA String value. Text description of error that occurred, if any.

Remarks

The Connected event will always fired after the Connect method is issued. If wodSSH successfully connected to the server ErrorCode will be set to 0 and you can start sending and receiving data to and from server. If ErrorCode is not 0, then wodSSH will immediately close the connection.

For SSH protocols, it is possible that wodSSH will internally negotiate connection parameters before the Connected event is fired at all. This is done to make wodSSH as transparent to the protocol used as possible. You might notice packets transmitted to and from server whilst connecting, meaning wodSSH is already connected but is still negotiating protocol parameters.

If SSH protocols are used, please check the Protocol property as you might find that it has been changed internally by wodSSH. This is possible if you set it to SSHAuto. wodSSH will negotiate whatever SSH protocol version is possible and change the Protocol property accordingly.

Platforms

Windows