Back to product page

Connected method


Called when wodSSH connects to remote server.

Type

None

Syntax

  • Basic
object.Connected Owner, ErrorCode, ErrorText
The Connected(object,Owner,ErrorCode,ErrorText) syntax has these parts:
objectAn expression evaluating to an object of type IwodSSHNotify.
OwnerA wodSSHCom object.
ErrorCodeAn Integer value. Error number for error that occurred, if any.
ErrorTextA String value. Text description of error that occurred, if any.

Remarks

This method is called only if you implemented the IwodSSHNotify interface in your application, and the wodSSH.Notification property has received a reference to instance of your implementation.

The Connected notification method will always be called after the Connect method is issued. If wodSSH successfully connected to the server, ErrorCode will be set to 0 and you can start sending/receiving data from the 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 notification method is called at all. This is done to make wodSSH as transparent to the protocol used as possible. You might notice packets being transmitted to and from the 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 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