irmen / Tale

Interactive fiction (text adventure) and Mud framework
http://tale.readthedocs.io/
GNU Lesser General Public License v3.0
145 stars 35 forks source link

Add support for classic telnet connections #26

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm interested in modifying Tale to support "classic" Telnet (and/or SSH) for MUD mode. I noticed this is in your roadmap so if you have any ideas about how you'd prefer this to be implemented let me know and I'll draw within those lines. Any help getting started appreciated!

AmberFennek commented 8 years ago

@berkeleynerd Twisted python asynchronous framework might be useful for this task.

irmen commented 8 years ago

the Driver class is creating one of the "text i/o" sub modules from the tio package to handle all text i/o, see the __start method. While I've been using some form of async i/o I think it's quite hard to retrofit this onto a true async framework such as twisted, but I've never looked into this so who can tell

ghost commented 8 years ago

Twisted is by all accounts great but I'd rather just follow the design pattern you used to handle http and deal with scaling later if it ever becomes an issue for anyone. Thanks for the input. I'll reach out with questions here if any come up before I have a pull request ready.

irmen commented 8 years ago

If it looks too hard to build a "tio" style telnet server implementation it may be worthwhile to investigate if you can create a sort of telnetd-proxy in front of a tale server. Tale is able to run in http mode and perhaps you could let the telnetd proxy talk http to tale and telnet to the clients.

ghost commented 8 years ago

A telnetd proxy is a good idea. I'll consider this if banging my head on the "tio" implementation consumes too much time.

irmen commented 8 years ago

It should be relatively straightforward to see what the http API is by reading script.js and/or snooping the requests in your browser's devtools