Back to product page

Connect method


Connects to remote server.

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 wodTelnetDLX
HostnameOptional. A Variant value. Holds name or IP address of the server.
PortOptional. A Variant value. Specifies port number on the server.
ProtocolOptional. A Variant value. Specifies protocol to use with the server.

Remarks

Connect method will initiate connection between wodTelnetDLX and the remote server. It can be used only if wodTelnetDLX 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, wodTelnetDLX successfully connected with remote server.

Upon connection, wodTelnetDLX may perform initial 'handshake' with remote server, depending on protocol selected. For example, in Telnet protocol wodTelnetDLX will negotiate connection parameters. For SSH and SSL protocols, it will negotiate encryption algorithms and other properties related to secured connection.

After handshake is completed, wodTelnetDLX may perform automatic authentication with server, depending if Login and Password properties are set.

Optionally, if Command property is set, wodTelnetDLX will send the command, wait for an answer from server, and disconnect automatically. If Command property is empty (default), wodTelnetDLX will open shell on remote server and it will allow you to send/receive data.

Platforms

Windows