kawa
Class Telnet
- Runnable
public class Telnet
extends java.lang.Object
implements Runnable
Encapsulates the state of a telnet connection.
When run as an application, is a a minimal telnet client.
static int | DO - Indicates the request that the other party perform, or
confirmation that you are expecting the other party to perform, the
indicated option.
|
static int | DONT
|
static int | ECHO
|
static int | SUPPRESS_GO_AHEAD
|
static int | WILL - Indicates the desire to begin performing, or confirmation that
you are now performing, the indicated option.
|
static int | WONT - Indicates the refusal to perform,or continue performing, the
indicated option.
|
byte[] | terminalType
|
short | windowHeight
|
short | windowWidth
|
Telnet(java.net.Socket socket, boolean isServer)
|
DO
public static final int DO
Indicates the request that the other party perform, or
confirmation that you are expecting the other party to perform, the
indicated option.
DONT
public static final int DONT
ECHO
public static final int ECHO
SUPPRESS_GO_AHEAD
public static final int SUPPRESS_GO_AHEAD
WILL
public static final int WILL
Indicates the desire to begin performing, or confirmation that
you are now performing, the indicated option.
WONT
public static final int WONT
Indicates the refusal to perform,or continue performing, the
indicated option.
terminalType
public byte[] terminalType
windowHeight
public short windowHeight
windowWidth
public short windowWidth
Telnet
public Telnet(java.net.Socket socket,
boolean isServer)
throws java.io.IOException
main
public static void main(String[] args)
request
public void request(int command,
int option)
throws java.io.IOException
Request (from this side) a new option state.
Command is one of DO, DONT, WILL, WONT.
subCommand
public void subCommand(byte[] buf,
int off,
int len)
Handle a sub-command (SB-sequence) that we received.