}
this.input = new InputStreamReader(inputStream, "UTF-8");
- // TODO: include TelnetSocket from NIB and have it implement
- // SessionInfo
if (input instanceof SessionInfo) {
+ // This is a TelnetInputStream that exposes window size and
+ // environment variables from the telnet layer.
sessionInfo = (SessionInfo) input;
}
if (sessionInfo == null) {
// Enable mouse reporting and metaSendsEscape
this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true));
+ this.output.flush();
// Hang onto the window size
windowResize = new TResizeEvent(TResizeEvent.Type.SCREEN,
for (int i = 0; i < rc; i++) {
int ch = readBuffer[i];
processChar(events, (char)ch);
- if (events.size() > 0) {
- // Add to the queue for the backend thread to
- // be able to obtain.
- synchronized (eventQueue) {
- eventQueue.addAll(events);
- }
- synchronized (listener) {
- listener.notifyAll();
- }
- events.clear();
+ }
+ getIdleEvents(events);
+ if (events.size() > 0) {
+ // Add to the queue for the backend thread to
+ // be able to obtain.
+ synchronized (eventQueue) {
+ eventQueue.addAll(events);
+ }
+ synchronized (listener) {
+ listener.notifyAll();
}
+ events.clear();
}
}
} else {