Class socket.TelnetIO
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class socket.TelnetIO

java.lang.Object
   |
   +----socket.TelnetIO

public class TelnetIO
extends Object
implements StatusPeer
Implements simple telnet io

Constructor Index

 o TelnetIO()

Method Index

 o connect(String)
Connect to the remote host at the default telnet port (23).
 o connect(String, int)
Connect to the remote host at the specified port.
 o disconnect()
Disconnect from remote host.
 o notifyStatus(Vector)
Notify about current telnet status.
 o receive()
Read data from the remote host.
 o send(byte)
 o send(byte[])
Send data to the remote host.
 o setPeer(StatusPeer)
Set the object to be notified about current status.

Constructors

 o TelnetIO
  public TelnetIO()

Methods

 o connect
  public void connect(String address,
                      int port) throws IOException
Connect to the remote host at the specified port.
Parameters:
address - the symbolic host address
port - the numeric port
See Also:
disconnect
 o disconnect
  public void disconnect() throws IOException
Disconnect from remote host.
See Also:
connect
 o connect
  public void connect(String address) throws IOException
Connect to the remote host at the default telnet port (23).
Parameters:
address - the symbolic host address
 o setPeer
  public void setPeer(StatusPeer obj)
Set the object to be notified about current status.
Parameters:
obj - object to be notified.
 o receive
  public byte[] receive() throws IOException
Read data from the remote host. Blocks until data is available. Returns an array of bytes.
See Also:
send
 o send
  public void send(byte buf[]) throws IOException
Send data to the remote host.
Parameters:
buf - array of bytes to send
See Also:
receive
 o send
  public void send(byte b) throws IOException
 o notifyStatus
  public Object notifyStatus(Vector status)
Notify about current telnet status. This method is called top-down.
Parameters:
status - contains status information

All Packages  Class Hierarchy  This Package  Previous  Next  Index