-
james authored
the actual stream, rather than directly inherited from the stream. This means we have to implement all the damned stream functions for it, but oh well. Most of them will just be wrappers anyway. Finished renaming old NVT constants. Now we say +CMD-FOO+ and +OPT-FOO+. Start of work on option and command handling. PROCESS-TELNET-COMMAND does things with IAC sequences. SUBNEGOTIATE-OPTION handles IAC SB ... IAC SE. Example is SUBNEGOTIATE-NAWS-OPTION which puts together NAWS width and height and passes them to a user-supplied support function. There's something wrong with how commands and options are processed, one character at a time. I think it might be better to snarf an entire IAC sequence (maybe two, if we see eg IAC SB) and then process that all at once. This bears consideration. It would certainly allow us to recover cleanly from corruption, and would probably be faster too. Another issue pending is whether the stream should be bytes rather than characters. Using characters could cause problems if Unicode appeared.
2b66d4ac