telnet_naws_client_.set_activatable(); // NOTE:This line isn't even really needed in practice.
telnet_naws_client_.on_window_size_changed.connect(
[this](auto &&width, auto &&height) -> std::vector<telnetpp::token>
{
this->on_window_size_changed(width, height);
return {};
});
telnet_session_.install(telnet_naws_client_);
// later, to turn the option on.
write(telnet_session_.send(telnet_naws_client_.activate()));
I have since worked on factoring out some of the functionality I described from Paradice, and today I wish to announce that Telnet++ and Terminal++ have reached a state where I am proud to announce them as ready for use. They are both C++14 libraries, and are tested using Clang 3.4 and G++ 5.2.
Telnet++
A drop-in module for managing and manipulating a Telnet session and its negotiated options, as well as a framework in which options can be quickly and easily developed. In Paradice, Telnet++ is used primarily to activate the "Suppress Go-Ahead" and "Echo" options in order to access Character-At-A-Time Mode, which is necessary for "graphical" output. It also additionally supports the Negotiate About Window Size (NAWS) option, to inform the server of the size of the remote screen.
On the to-do list for the future is to also provide support for the MCCP and NEW_ENVIRON options.
Terminal++
A library for manipulating a terminal screen. At its most basic level, this provides an API for strings of "attribute characters": characters that carry around information about how they can be presented on the remote screen, such as colour, boldness, etc. However, with a terminal that supports Character-At-A-Time Mode, the library also presents an interface that can control the complete graphical output, including cursor positioning and movement, and with the support of the XTerm protocols, the usage of the mouse. Indeed, it becomes possible to create fully-fledged text-based windowing interfaces.
At the moment, Terminal++ provides everything necessary to manipulate screens of attributed characters. On the horizon is to provide an actual windowing GUI class library, similar to the one in Paradice.
Telnet++ and Terminal++ are released under the MIT Licence, which permits use for any purpose with minimal overhead.
I fully welcome any and all comments and criticism on the libraries, any feature requests, forks, pull requests, queries, issues, etc. The links above head to the respective Github projects,