Releases: moodclient/telnet
v0.8.0
v0.7.0
Several minor bugfixes, and the addition of the LINEMODE telopt, which was necessary to get retrocampus BBS working.
v0.6.0
Several fixes for BBS's, and add a BBS-focused example.
The largest change was that outbound data was consolidated in the same way printer output was, and the keyboard received a LineOut method that can be used to pipe already-parsed TerminalData out to the remote. This is used for character mode, which no longer interacts with line editing capabilities in LineFeed. We now also inject a null into the input parser after 100ms of inactivity to ensure that ESC can be piped out if it's standalone.
Several BBS Improvements
In the process of getting 20forbeers working, some improvements were made:
- The linefeed now supports the delete key
- The keyboardfeed now sends BS instead of DEL for the backspace key (20forbeers requires this)
- Bytes now move through the system in much larger batches
- Reworked charset fallback for some improved performance, and it's more likely to fall back more text when there are issues
- I had to rebuild the ansi decoding to be based on charm's ansi.DecodeSequence instead of ansi.Parser.Advance. ansi.Parser.Advance will always eat standalone ESC codes instead of passing them along, ansi.DecodeSequence will pass along double ESC's, allowing us to use the 20forbeers "ESC twice to enter" prompt. While I was at this, I split out SequenceData into a different TerminalData type for each sequence type.
v0.4.2
various improvements & bugfixes
v0.4.1
Fixed a few bugs and added a new "tls_echo" example that creates a client and server, connects to the server using TLS, and then uses a server-side line feed to echo in-progress text to the client.
v0.4.0
Rewrote the keyboard feed & created "LineFeed" which does general purpose line construction & echoing. Can be used for both client and server side. The MUD client example is now in raw mode & works with both line and char mode servers
v0.3.0
I liked the new PrinterOutput stuff so much, I decided to replace the outbound text/command hooks with exactly the same thing. Unfortunately, that meant renaming PrinterOutput and friends to something more neutral (TerminalData).
Add a few godoc comments
v0.2.1 document printer_output.go
v0.2.0
- Heavily rewrote the printer. Some major changes:
- TelOpt negotiations now take place synchronously on the printer goroutine, ensuring that changes to communication semantics that take place as a result of received messages will immediately apply to data received after those messages.
- IncomingText and IncomingCommand hooks have been replaced with the PrinterOutput hook. The concept of "line rewriting" is gone from text output, and instead the printer simply outputs data by type. Commands, Text, Control Codes, Prompts, and Sequences are each output from the printer as their own PrinterOutput type. These types are guaranteed not to release partial data (for instance, only full sequences will be output, only complete utf-8 characters, etc.). Consumers can receive, identify, and reason about each of these types to decide what to do.
- Major changes to TelnetKeyboard:
- WritePromptHint no longer simply calls WriteCommand. Instead, prompts are queued alongside other text when the keyboard is locked, and the decision of what command to be sent (if any) is not made until just before writing to the output stream, in order to ensure SUPPRESS-GO-AHEAD/EOR changes made after queuing a prompt are respected.
- WriteCommand now accepts a post-write function to be executed immediately after writing a command to the output stream. This is useful for cases when the command is announcing a change in communication semantics to the remote. In such a case, communications changes should immediately take effect for subsequent writes, and the post-write function will ensure that that happens. All telopts have been updated to take advantage of this functionality.
- Major changes to Charset:
- Charset now has separate decoding & encoding negotiated charsets that need to be set separately and can be reasoned about separately. The CHARSET telopt handles setting these two charsets. This was necessary, because a correct implementation of CHARSET will update the decoding charset as soon as the command is received from the remote but not update the encoding charset until immediately after the acceptance command is sent.
- Charset now has the concept of a fallback charset which is used for decoding when the current default/negotiated charset fails. This has been piped through to the printer and fallback decoding is fully working. The fallback charset name can be set in the TerminalConfig object. It can be left blank, resulting in no fallback functionality.
- TelnetScanner added:
- Most consumers have no use for this, but TelnetScanner is a type that can be used with any io.Reader to read telnet data into the same PrinterOutput types output by the Terminal's PrinterOutput hook. Some consumers interested in their own use cases and not interested in using Terminal may find this helpful.