git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
telnet support 75%
[fanfix.git]
/
src
/
jexer
/
net
/
TelnetSocket.java
diff --git
a/src/jexer/net/TelnetSocket.java
b/src/jexer/net/TelnetSocket.java
index 6c1794c070ad7bd4b62fe9f056343b8f67362eaf..2724e54953409ff83670a1c6adb2cddc40f8bf19 100644
(file)
--- a/
src/jexer/net/TelnetSocket.java
+++ b/
src/jexer/net/TelnetSocket.java
@@
-108,10
+108,7
@@
public final class TelnetSocket extends Socket {
boolean readCR;
// Flags used by the TelnetOutputStream
boolean readCR;
// Flags used by the TelnetOutputStream
- int writeRC;
- int writeLastErrno;
- boolean writeLastError;
- boolean writeCR;
+ boolean writeCR;
/**
* Constuctor calls reset().
/**
* Constuctor calls reset().
@@
-141,11
+138,7
@@
public final class TelnetSocket extends Socket {
eofMsg = false;
readCR = false;
eofMsg = false;
readCR = false;
- writeRC = 0;
- writeLastErrno = 0;
- writeLastError = false;
writeCR = false;
writeCR = false;
-
}
}
}
}
@@
-172,6
+165,12
@@
public final class TelnetSocket extends Socket {
super();
nvt = new TelnetState();
this.socket = socket;
super();
nvt = new TelnetState();
this.socket = socket;
+
+ output = new TelnetOutputStream(this, super.getOutputStream());
+ input = new TelnetInputStream(this, super.getInputStream(), output);
+
+ // Initiate the telnet protocol negotiation.
+ input.telnetSendOptions();
}
// Socket interface -------------------------------------------------------
}
// Socket interface -------------------------------------------------------
@@
-183,9
+182,6
@@
public final class TelnetSocket extends Socket {
*/
@Override
public InputStream getInputStream() throws IOException {
*/
@Override
public InputStream getInputStream() throws IOException {
- if (input == null) {
- input = new TelnetInputStream(this, super.getInputStream());
- }
return input;
}
return input;
}
@@
-196,9
+192,6
@@
public final class TelnetSocket extends Socket {
*/
@Override
public OutputStream getOutputStream() throws IOException {
*/
@Override
public OutputStream getOutputStream() throws IOException {
- if (output == null) {
- output = new TelnetOutputStream(this, super.getOutputStream());
- }
return output;
}
return output;
}