Telnet Factory for .NET

Rlogin.Connect Method (String, Int32, String, String, String, Int32)

Establishes a connection to the Remote Host.

public void Connect(
   string hostname,
   int port,
   string username,
   string localUsername,
   string terminalType,
   int terminalSpeed
);

Parameters

hostname
The hostname or IP address of the Remote Host.
port
The Remote Host port number. By default port 513 will be used.
username
The username for the Remote Host.
localUsername
The username for the Remote Host used to execute the command.
terminalType
The name of the terminal, or blank for dumb terminal.
terminalSpeed
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.

Example

To establish a connection to a Remote Host, create an Rlogin instance and provide the required arguments.

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

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

See Also

Rlogin Class | Jscape.Telnet Namespace | Rlogin.Connect Overload List