15 Dec, 2015, Kaz wrote in the 1st comment:
Votes: 0
In the first two issues of the newly re-published Imaginary Realities, I was fortunate enough to publish a pair of articles about the feature set of my project, Paradice 9. In particular, my aim in these articles was to espouse that we have ignored some of the basic features of the ANSI/VT100 for far too long.

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.

surprise

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,
18 Dec, 2015, Ssolvarain wrote in the 2nd comment:
Votes: 0
Sounds pretty awesome.
18 Dec, 2015, Kaz wrote in the 3rd comment:
Votes: 0
Ssolvarain said:
Sounds pretty awesome.


I like to think so. :) Thanks!
18 Dec, 2015, quixadhal wrote in the 4th comment:
Votes: 0
If I were less lazy, I'd be tempted to try and port it to python. A termcap/curses style library that can be used on multiple sockets is a nice thing to have. :) Nice job!
18 Dec, 2015, Kaz wrote in the 5th comment:
Votes: 0
quixadhal said:
If I were less lazy, I'd be tempted to try and port it to python. A termcap/curses style library that can be used on multiple sockets is a nice thing to have. :) Nice job!


I would welcome the port. Or, it might be a good excuse to use Boost.Python and see if it's possible to expose Terminal++ as a Python module. In any case, I'd be more than happy to field any questions. There's quite a bit of research captured in the library.

"Curses for sockets" is indeed the elevator pitch that I've used when trying to explain what I'm developing to friends, and in the terminal::behaviour structure, there's the beginning of something analogous to termcap, but it's not all there yet. I really need to work on my client detection algorithms and to flesh out the potential behaviours.
18 Dec, 2015, Tyche wrote in the 6th comment:
Votes: 0
I'm very interested. :-)
25 May, 2016, Kaz wrote in the 7th comment:
Votes: 0
To resurrect my thread, I've recently updated my Telnet++ library to v1.2, which introduces options for MCCP, MSDP, and NEW_ENVIRON, and I've taken a better look at the documentation. The changelog has the rest of the details.

From a usage perspective, it took me all of 15 minutes to add MCCP into Paradice and to test that it was working in Tintin++. My finding was that my text box that used to send about 1KB of data when scrolled now sends around 300B. This makes me happy.

I still welcome any input and/or criticism and/or ideas for any of these projects.
27 May, 2016, Pacifist03 wrote in the 8th comment:
Votes: 0
What advantages does telnet++ compared libtelnet (https://github.com/seanmiddleditch/libte...) or Anachronism (https://github.com/Twisol/anachronism)?
28 May, 2016, Kaz wrote in the 9th comment:
Votes: 0
Pacifist03 said:
What advantages does telnet++ compared libtelnet (https://github.com/seanmiddleditch/libte...) or Anachronism (https://github.com/Twisol/anachronism)?


I had a look at both of these libraries. Anachronism, as far as I can tell, only provides a basic skeleton for Telnet handling. Anything beyond negotiating options is left out.

libtelnet is very interesting, implements the Q method (I'm not sure I do – probably not, and that's something to put on the backlog) and also supports a number of options, but I find its extensibility lacking due to the choice of having the main "event" structure be a union of known types. This means that it is necessary to change the library in order to implement a new option.

That aside, I think the best part of the library is that it has a higher abstraction level through the telnetpp::session class. Have a look at connection.cpp in Paradice9: In particular, the lines given over to NAWS:

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()));


Note: no mentions of WILLs or WONTs. No subnegotiations. Just, "When the window size changes, tell me about it."

So the tl;dr answer to your question is: Telnet++ provides an extensible framework with a library of reference options at a high abstraction level.
06 Jun, 2016, Twisol wrote in the 10th comment:
Votes: 0
Kaz said:
I had a look at both of these libraries. Anachronism, as far as I can tell, only provides a basic skeleton for Telnet handling. Anything beyond negotiating options is left out.

libtelnet is very interesting, implements the Q method (I'm not sure I do – probably not, and that's something to put on the backlog) and also supports a number of options, but I find its extensibility lacking due to the choice of having the main "event" structure be a union of known types. This means that it is necessary to change the library in order to implement a new option.


Anachronism also implements the Q method, for what it's worth. It's true that Anachronism itself doesn't provide any specific option implementations, but that's because it was intended to be modular: you'd register some third-party option-implementing library with Anachronism by binding it to an option number. That said, there really aren't any third-party libraries that use Anachronism, as far as I can tell. So, it comes down to the same thing.

For MUD-specific applications, libtelnet is probably better than Anachronism, since it comes with more functionality baked in. I only wrote Anachronism as an experiment in what a "better" or more "general" low-level Telnet library might look like.

I can't speak to Telnet++ - either it didn't exist when I was writing Anachronism, or I didn't look very hard. Based on a cursory glance at its README, it looks pretty similar to Anachronism in its capability to register arbitrary option implementations, except in a modern C++ API and with pre-built reference implementations for common options. It looks pretty nice :)
06 Jun, 2016, Kaz wrote in the 11th comment:
Votes: 0
Twisol said:
I can't speak to Telnet++ - either it didn't exist when I was writing Anachronism, or I didn't look very hard. Based on a cursory glance at its README, it looks pretty similar to Anachronism in its capability to register arbitrary option implementations, except in a modern C++ API and with pre-built reference implementations for common options. It looks pretty nice :)


There's a little bit of an overlap in time period. I started factoring Telnet++ out of my Paradice project last October, declaring it "ready" for general purpose use in December (see OP). From the look of the Anachronism Github repository, it looks like it was started in November.

I think it's really interesting that there are competing libraries for this, even if it is "old tech" (or even, dare I say, anachronistic), since each library speaks to the use cases for which it was designed.

Thanks for your comments!
07 Jun, 2016, Twisol wrote in the 12th comment:
Votes: 0
Kaz said:
Twisol said:
I can't speak to Telnet++ - either it didn't exist when I was writing Anachronism, or I didn't look very hard. Based on a cursory glance at its README, it looks pretty similar to Anachronism in its capability to register arbitrary option implementations, except in a modern C++ API and with pre-built reference implementations for common options. It looks pretty nice :)


There's a little bit of an overlap in time period. I started factoring Telnet++ out of my Paradice project last October, declaring it "ready" for general purpose use in December (see OP). From the look of the Anachronism Github repository, it looks like it was started in November.


November of 2010 - about five years before the first commit of Telnet++ on GitHub. ;)
08 Jun, 2016, Kaz wrote in the 13th comment:
Votes: 0
Twisol said:
November of 2010 - about five years before the first commit of Telnet++ on GitHub. ;)


Hah!

While we're trundling back in time, Paradice9 went live with the prototype for what would become Telnet++ in November 2009 (the precursor to Terminal++ being added in December 2010). Gosh, that's a long time ago now.
0.0/13