wodSFTP ActiveX Control - Connect Method
      
 

Description

Connects to the remote server.


Return Type

None  


Syntax

object.Connect [Hostname], [Port]



The Connect Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSFTP.
Hostname Optional. A Variant value. Specifies hostname or IP address of the server.
Port Optional. A Variant value. Specifies port on the server.

Remarks

The Connect method will initiate a connection between wodSFTP and the remote server. It can be used only if wodSFTP is not connected with a server at the time of the call (in other words, if State is set to Disconnected).

If an error occurs during connection, the Connected event will be fired with ErrorCode set to the error that occurred. If ErrorCode is set to 0, then wodSFTP successfully connected with the remote server.

Upon connection, wodSFTP may perform an initial 'handshake' with the remote server (it will negotiate encryption algorithms and other properties related to a secure connection.) There is no need to be concerned if you see network activity but you don't get a Connected event immediately. This happens because wodSFTP has connected and is transmitting/receiving packets as part of the 'handshake' negotiation.

After the handshake is completed, wodSFTP may perform automatic authentication with the server.