Choosing Telnet lib and language for the telnet gateway client?

I want to run a MUD client application that connects to a MUD hosted on a telnet server. The only thing that matters to me is that it works painlessly and efficiently in any OS. Other than this requirement, I am not selling in any language.

So, I'm looking for a freely accessible telnet client library on which I can base my application, so I donโ€™t need to understand too much about the protocol details.

+3
source share
6 answers

I have always considered Twisted for this kind of thing (Python).

The beauty is that if you later decide to change it to SSH or something more secure than telnet, you can with a little pain.

+7
source

Twisted, twisted, twisted!

To use telnet, see the twisted.conch.telnet package. He got the spartan API docs , but the real information about using it comes from a search in Google Code Search , for example this nugget from grailmud is a MUD server.

+3
source

There is a telnet interface in CPAN if you like Perl. This is pretty minimal, but he has to do his job.

[edit] libcurl should also be able to do telnet, although I could not find any examples of this.

+2
source

For all of my MUD programming, I just created my own routines from scratch using the RFC.

If you want to avoid some pain, I wrapped it in a fairly simple C # class that correctly handles Telnet. If you want to view it, you can view it here .

This code has been copied / pasted and run on Windows and Linux (via Mono) on several separate projects and works very well.

+2
source

pmc ( http://sourceforge.net/projects/perlmudclient/ ) was an attempt to do just that. I spent part of last week on this; it uses an old modified version of Net :: Telnet to do its connection work.

My problem is that Net :: Telnet seems to have a blocking interface when a partial line is sent by the server, i.e. a line that is not interrupted by a new line. It supports two functions that support this (waitfor and its request mechanism), since almost all telnet servers have prompts that are not completed with a new line.

MUDs often have โ€œhintsโ€ that are non-standard and change throughout the game; MUD I admin on has the โ€œYour Choice:โ€ prompt as its login [this is not just for usernames], and many of the gameโ€™s functions contain alternative hints. Therefore, I suspect you need to keep this in mind when you are looking for the cross-platform Telnet library!

0
source

If you like C, I heartily recommend libtelnet . It will maintain an internal state that does all the IAC parsing for you, and handles parameter matching using the Q method.

0
source

All Articles