*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* establish an 8-bit clean no echo channel and expose window resize events
* to the Jexer ECMA48 backend.
*/
-public final class TelnetSocket extends Socket {
+public class TelnetSocket extends Socket {
- /**
- * The telnet-aware socket InputStream.
- */
- private TelnetInputStream input;
-
- /**
- * The telnet-aware socket OutputStream.
- */
- private TelnetOutputStream output;
+ // ------------------------------------------------------------------------
+ // Constants --------------------------------------------------------------
+ // ------------------------------------------------------------------------
// Telnet protocol special characters. Note package private access.
static final int TELNET_SE = 240;
static final int C_LF = 0x0A;
static final int C_CR = 0x0D;
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * The telnet-aware socket InputStream.
+ */
+ private TelnetInputStream input;
+
+ /**
+ * The telnet-aware socket OutputStream.
+ */
+ private TelnetOutputStream output;
+
+
/**
* If true, this is a server socket (i.e. created by accept()).
*/
*/
String terminalSpeed = "";
- /**
- * See if telnet server/client is in ASCII mode.
- *
- * @return if true, this connection is in ASCII mode
- */
- public boolean isAscii() {
- return (!binaryMode);
- }
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
/**
* Creates a Socket that knows the telnet protocol. Note package private
super();
}
- // Socket interface -------------------------------------------------------
+ // ------------------------------------------------------------------------
+ // Socket -----------------------------------------------------------------
+ // ------------------------------------------------------------------------
/**
* Returns an input stream for this socket.
return output;
}
+ // ------------------------------------------------------------------------
+ // TelnetSocket -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * See if telnet server/client is in ASCII mode.
+ *
+ * @return if true, this connection is in ASCII mode
+ */
+ public boolean isAscii() {
+ return (!binaryMode);
+ }
+
}