tags:

views:

63

answers:

1

I'm working on writing a MUD-like game (in Python, if that matters). I've noticed that the Windows telnet client and Ubuntu's telnet client behave slightly differently when connecting to the server.

In Ubuntu, I type something, but the server doesn't recieve anything until I press enter. With Windows, every keystroke is sent to the server.

I want every client that connects to exhibit the behaviour I get from Ubuntu. I've tried implementing a buffer server-side, but I keep on running into issues (the latest being how I should handle backspace).

Is there any special command I can send to set the 'mode' of the telnet client? Or any recommended reading to better understand what's going on here?

UPDATE: It looks like all I have to do is run the following line as soon as a person connects.

socket.send( chr(255)+chr(251)+chr(34) )  #IAC WILL LINEMODE

However, this doesn't seem to have any effect. Anybody have any thoughts on what I'm doing wrong?

UPDATE 2: Found the problem. My server was sending everything it received from a user to every other user. This includes the acknowledgement that it gets from the client after I set the mode -- which produced some really screwy results.

A: 

http://stackoverflow.com/questions/273261/force-telnet-client-into-character-mode

gnibbler
Thanks. This pushed me in the right direction, but I'm still having issues.
mgroat