TelnetController

Purpose: Establish a telnet connection with a host and negotiate a very SIMPLE xterm terminal connection. The only data sent over the connection is the data that establishes the Telnet session options. Also allows sending and receiving of data to/from the Telnet session.

Properties:

String hostname

Host we will connect to. Can be a DNS name or an IP address.

int port

The TCP port we wish to connect to on the host.

Public Methods:

TelnetController(String host, int myPort)

Creates a new telnet controller object given the host and port	information.

BufferedInputStream getInputStream()

Returns a buffered input stream that can be used for reading

data sent from the host.

OutputStream getOutputStream()

Returns an output stream that can be used for writing data to

the host.

void connect()

Connects to the host and negotiates Telnet options.

void disconnect()

Disconnects from the host immediately.

Private Methods:

2004-02-29T11:03:24