Establishes a connection to the Remote Host.
Namespace: Jscape.TelnetAssembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0
Syntax
C# |
---|
public void Connect( string hostname, int port, string username, string localUsername, string terminalType, int terminalSpeed ) |
Visual Basic |
---|
Public Sub Connect ( _ hostname As String, _ port As Integer, _ username As String, _ localUsername As String, _ terminalType As String, _ terminalSpeed As Integer _ ) |
Visual C++ |
---|
public: void Connect( String^ hostname, int port, String^ username, String^ localUsername, String^ terminalType, int terminalSpeed ) |
Parameters
- hostname
- Type: System..::..String
The hostname or IP address of the Remote Host.
- port
- Type: System..::..Int32
The Remote Host port number. By default port 513 will be used.
- username
- Type: System..::..String
The username for the Remote Host.
- localUsername
- Type: System..::..String
The username for the Remote Host used to execute the command.
- terminalType
- Type: System..::..String
The name of the terminal, or blank for dumb terminal.
- terminalSpeed
- Type: System..::..Int32
The requested communications speed, or zero (0) for Remote Host default.
Remarks
Upon successful connection, creates an asynchronous thread to
read incoming data from the socket connection.
Note: Some systems limit the username to eight (8) characters or less. The Telnet Factory for .NET implementation does not restrict the length of usernames. If you have difficulty logging in to a Remote Host using a non-truncated username, try using the username truncated to 8 characters.
Rlogin requires Remote Host authorization to execute the command. This is accomplished using a combination of two system files, hosts.equiv and .rhosts, depending on your system. Consult your system documentation for more information about managing remote logins.
Examples
To establish a connection to a Remote Host, create an Rlogin instance and provide the
required arguments.
CopyRlogin Connect
CopyRlogin Connect

Rlogin rlogin = new Rlogin(); rlogin.Connect("remotehost.com", 513, "username", "localusername", "vt100", 19600);

Private WithEvents rlogin As Rlogin rlogin = New Rlogin rlogin.Connect("remotehost.com", 513, "username", "localusername", "vt100", 19600)