Telnet?

Previous topic - Next topic

Hemlos

Is it possible to use NETJOINGAME(server$, tcp_port%) to join a telnet session?
Bing ChatGpt is pretty smart :O

Moru

As long as you don't want to do anything fancy with telnet, using the socket commands to connect should not be very difficult.

FutureCow

What fancy stuff with telnet would be difficult with the socket commands? I can't think of anything - it should be straightforward.

Hatonastick

#3
It's not hard to do actually.  I built in the ability for Telnet negotiation in my (no, not this again, why doesn't he shut up?  =D) old MUD server.  As with most of those old protocols, the easiest way to handle it (server or client) is with a simple FSM (Finite State Machine) setup.  If you don't know how FSM's work, there are plenty of examples (or used to be) online or in various older C programming books (basically a loop with a long, long case statement with positions that you jump to depending on the current 'state').  There may be a more elegant solution in GLB, but I still think like an old C programmer so I'm probably not the person to answer that one.  Anyway all the old network protocols are fairly simple when you break them down.  Basically a process of questions and answers that go between the server and client.

Be aware that the Microsoft Telnet client _does not_ act like a real telnet client.  It's missing half the protocols and doesn't react the way it should when sent certain queries.  I came up with a way to identify whether or not someone was using the MS version and then handling it's oddities with various hard-coded solutions, but don't ask me to tell you how as I don't remember -- theres likely more elegant solutions (if needed) around these days anyway if you check around.  This was a long, long time ago though so no idea if their current client (do Vista and Windows 7 have one?) behaves more appropriately.  If you are using Linux or OSX though, you are safe. :)

Edit:  Wow, once again I do a brilliant job of answering questions that are asked in my head rather than the ones the OP _actually_ asked.  Sorry about that.  I'll leave this here just in case there is something useful in my reply, but will delete later if there isn't.

Hemlos

Thanks for all the informative replies, i appreciate it.

Bing ChatGpt is pretty smart :O