-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKLUDGES
22 lines (17 loc) · 1.19 KB
/
KLUDGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
All help text for the /help command is currently hardcoded into the source
code, as an expedient kludge to minimize file I/O. This is important, since
blocking on file I/O would cause the server to appear to freeze from the
user's perspective -- basic typing echo depends on the main loop to execute
quickly without blocking. The help text was hardcoded to minimize this risk.
No, this isn't elegant or convenient. Yes, this will be changed.
The Session and Telnet classes are larger than they ought to be. They have
grown and are in need of splitting into further classes when time permits.
The Session class could use a proper command parser (in a separate class, of
course); the current code is ugly and relies on brute force, not finesse.
The Telnet class currently performs all input editing and terminal handling
functions directly; these should be implemented in separate classes.
The editing and terminal handling code does not belong in the Telnet class;
separate editor and terminal classes should be created.
The state machines in the Telnet class are based on switch/case statements,
which is effective but verbose. Table-driven state machines would probably
be preferable and more flexible.