Back to product page

Connected method


Called when wodSFTP connects to a 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 IwodSFTPNotify.
OwnerA wodSFTPCom object.
ErrorCodeAn Integer value. Error number, if error occurred.
ErrorTextA String value. Text description of the error, if any.

Remarks

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

The Connected notification method will always be called 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 the 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 notification method is called. 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 notification to be called. This means wodSFTP is connected already but is still negotiating protocol parameters.

Platforms

Windows