com.mindbright.net.telnet
public class TelnetNVT extends java.lang.Object implements java.lang.Runnable
TelnetEventHandler
which gets the
actual data received from the other end.
Most of the contants and methods in this class should be fairly obvious to people having deep enough knowledge of rfc854.
TelnetEventHandler
Modifier and Type | Field and Description |
---|---|
static int |
CODE_ABORT |
static int |
CODE_AYT |
static int |
CODE_BREAK |
static int |
CODE_CR |
static int |
CODE_DM |
static int |
CODE_DO |
static int |
CODE_DONT |
static int |
CODE_EC |
static int |
CODE_EL |
static int |
CODE_EOR |
static int |
CODE_GA |
static int |
CODE_IAC |
static int |
CODE_IP |
static int |
CODE_LF |
static int |
CODE_NOP |
static int |
CODE_SB |
static int |
CODE_SE |
static int |
CODE_WILL |
static int |
CODE_WONT |
static int |
OPT_BINARY |
static int |
OPT_ECHO |
static int |
OPT_EOR |
static int |
OPT_NAWS |
static int |
OPT_NEWENV |
static int |
OPT_REMFCTL |
static int |
OPT_SGA |
static int |
OPT_SPEED |
static int |
OPT_STATUS |
static int |
OPT_TTYPE |
static int |
OPT_XDISP |
static int |
SB_CMD_IS |
static int |
SB_CMD_NAME |
static int |
SB_CMD_REPLY |
static int |
SB_CMD_SEND |
Constructor and Description |
---|
TelnetNVT(TelnetEventHandler eventHandler,
java.io.InputStream in,
java.io.OutputStream out)
Create a new instance of the telnet protocol.
|
Modifier and Type | Method and Description |
---|---|
void |
dontOption(int option) |
void |
doOption(int option) |
java.lang.Thread |
getThread() |
protected int |
interpretAsCommand(int cmd) |
protected void |
optionNegotiation(int option,
int request) |
void |
run() |
void |
sendBreak() |
void |
sendData(byte[] data) |
void |
sendData(byte[] data,
int off,
int sz) |
void |
sendData(int b) |
void |
sendOptionSubNegotiation(int option,
byte[] params) |
void |
start() |
void |
willOption(int option) |
void |
wontOption(int option) |
public static final int CODE_LF
public static final int CODE_CR
public static final int CODE_EOR
public static final int CODE_SE
public static final int CODE_NOP
public static final int CODE_DM
public static final int CODE_BREAK
public static final int CODE_IP
public static final int CODE_ABORT
public static final int CODE_AYT
public static final int CODE_EC
public static final int CODE_EL
public static final int CODE_GA
public static final int CODE_SB
public static final int CODE_WILL
public static final int CODE_WONT
public static final int CODE_DO
public static final int CODE_DONT
public static final int CODE_IAC
public static final int OPT_BINARY
public static final int OPT_ECHO
public static final int OPT_SGA
public static final int OPT_STATUS
public static final int OPT_TTYPE
public static final int OPT_EOR
public static final int OPT_NAWS
public static final int OPT_SPEED
public static final int OPT_REMFCTL
public static final int OPT_XDISP
public static final int OPT_NEWENV
public static final int SB_CMD_IS
public static final int SB_CMD_SEND
public static final int SB_CMD_REPLY
public static final int SB_CMD_NAME
public TelnetNVT(TelnetEventHandler eventHandler, java.io.InputStream in, java.io.OutputStream out)
eventHandler
- event handler which will get the data
receivedin
- stream from which data from the telnet server is readout
- stream over which to send data to the telnet serverpublic void start()
public void run()
run
in interface java.lang.Runnable
public java.lang.Thread getThread()
public void sendData(byte[] data) throws java.io.IOException
java.io.IOException
public void sendData(byte[] data, int off, int sz) throws java.io.IOException
java.io.IOException
public void sendData(int b) throws java.io.IOException
java.io.IOException
public void sendBreak() throws java.io.IOException
java.io.IOException
public void doOption(int option) throws java.io.IOException
java.io.IOException
public void dontOption(int option) throws java.io.IOException
java.io.IOException
public void willOption(int option) throws java.io.IOException
java.io.IOException
public void wontOption(int option) throws java.io.IOException
java.io.IOException
public void sendOptionSubNegotiation(int option, byte[] params) throws java.io.IOException
java.io.IOException
protected void optionNegotiation(int option, int request) throws java.io.IOException
java.io.IOException
protected int interpretAsCommand(int cmd)