(Newbie) Help with sockets.

Grant Edwards grante at visi.com
Thu Feb 28 23:22:06 EST 2008


On 2008-02-29, Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
> En Fri, 29 Feb 2008 00:20:26 -0200, <mentaltruckdriver at gmail.com> escribió:
>
>> Hi everyone. I'm fairly new to Python, and even more new to socket
>> programming. I think I've wrapped my head around sockets, and with
>> that I want to create a Telnet-based chat server, the idea being
>> people connect to the telnet servers with their clients and they all
>> communicate. I've got the code working, but the server sends each
>> letter to the clients on a new line! I've read about this kind of
>> thing on Windows on Google, but I can't find a solution to this issue.
>
> The telnet client can use "line mode" or "character mode". In "line mode"  
> nothing is sent until the user press Enter; line editing is made on the  
> client side. In "character mode" keystrokes are sent as soon as typed;  
> probably your telnet client is using this mode.

That's definitely going to be a problem.


To the OP:

You claim to be writing a telnet server, yet I don't see any
code that actually implements the telnet protocol. Different
telnet clients default to different modes, so if you want them
in a certain mode, you have to put them in the desired mode by
implementing the telnet feature negotiation protocol.

-- 
Grant Edwards                   grante             Yow!  It's strange, but I'm
                                  at               only TRULY ALIVE when I'm
                               visi.com            covered in POLKA DOTS and
                                                   TACO SAUCE...



More information about the Python-list mailing list