public class TelnetClientExample extends Object implements Runnable, TelnetNotificationHandler
Also, use of the sendAYT(), getLocalOptionState(), getRemoteOptionState() is demonstrated. When connected, type AYT to send an AYT command to the server and see the result. Type OPT to see a report of the state of the first 25 options.
RECEIVED_COMMAND, RECEIVED_DO, RECEIVED_DONT, RECEIVED_WILL, RECEIVED_WONT
Constructor and Description |
---|
TelnetClientExample() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Main for the TelnetClientExample.
|
void |
receivedNegotiation(int negotiation_code,
int option_code)
Callback method called when TelnetClient receives an option
negotiation command.
|
void |
run()
Reader thread.
|
public static void main(String[] args) throws Exception
args
- input paramsException
- on errorpublic void receivedNegotiation(int negotiation_code, int option_code)
receivedNegotiation
in interface TelnetNotificationHandler
negotiation_code
- - type of negotiation command received
(RECEIVED_DO, RECEIVED_DONT, RECEIVED_WILL, RECEIVED_WONT, RECEIVED_COMMAND)option_code
- - code of the option negotiated