Back to product page

Connected event


Fires when wodSFTP connects to the remote server.

Syntax

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

Remarks

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

It is possible that wodSFTP will internally negotiate connection parameters before the Connected event is fired. This is done to make wodSFTP as transparent as possible to the protocol used. You might notice packets being transmitted to/from the server while you are waiting for the Connected event to fire. This means wodSFTP is connected already but is still negotiating protocol parameters.

During this time, Extensions property will be also populated with list of extensions (if any), and version of SFTP protocol used on the server.

Platforms

Windows