Back to product page

Connect method


Connects to remote server.

Type

None

Syntax

  • Basic
object.Connect[Hostname], [Port], [Protocol]
The Connect(object,Hostname,Port,Protocol) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
HostnameOptional. A Variant value. String expression that holds name of remote server, or his IP address.
PortOptional. A Variant value. Integer value that represents port on remote server.
ProtocolOptional. A Variant value. Constant value that represents protocol to be used with this connection.

Remarks

Connect method will initiate connection between wodFtpDLX and the remote server. It can be used only if wodFtpDLX is not connected with server at the same moment (in other words, if State is set to Disconnected.

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

Upon connection, wodFtpDLX may perform initial 'handshake' with remote server, depending on protocol selected. For example, SFTP and FTPS protocols will negotiate encryption algorithms and other properties related to secured connection.

After handshake is completed, wodFtpDLX will perform automatic authentication with server.

If authentication is successful, wodFtpDLX will try to retrieve home path of the user, and store it initially to RemotePath property.

Platforms

Windows