Re: net.py & Telnet negotiation update

will guaraldi <[email protected]>
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
Well, I don't know about "right".  I think the issue you're describing are
different than the ones that I encountered a while back.

Well, I'm going to abandon my new net.py (based on the telnetlib) and go
back to fixing up the existing one which has some major flaws.

One of the major flaws that I keep alluding to is exactly the same as the
telnetlib flaw as outlined below.  The existing net.py handles telnet
option negotiation out of sync with the data.  handleNego only gets called
if there's an IAC in the data it's looking at and if there is, it handles
all the telnet options and then removes them from the stream which is
totally borked.  I do the same thing (erroneously) with the BELL.  Both
things need to get fixed and the net module could use a refactoring
(especially in regards to the session).

Soon, maybe.

/will


On Tue, 20 Apr 2004, Brazen wrote:
>
> Well, Will was right all along.  telnetlib.py sucks.
>
> It works well enough when you are trying to do simple negotation but it
> crashes and dies with MCCP and GA/EOR.
>
> The problem with MCCP is that the server will start sending compressed
> data immediately after replying to your MCCP-Go! message.  With
> telnetlib we don't have that fined grained control, we can only start
> decompressing the stream on the next read from a socket.  So if the last
> read had the server's MCCP message AND some extra text in it, we have no
> way of decompressing the text. lensmoor.org does MCCP after login when
> nothing else is happening so it works fine.  cryosphere does a flood of
> telnet negotiation at once so MCCP gets out of sync pretty easilly. (If
> you test on cryosphere use the test port at 6665 so people don't get
> spammed w/ login messages).
>
> GA/EOR is similar, we can't know from the negotiation callback what text
> was before or after the GoAhead to pass it back up to the guy who called
> read(). So processing of negotiation has to happen synchronously with
> breaking things up into lines.
>
> So telnetlib is a bust, it looks good until you really start flexing it
> and then it falls apart.
>
> -Brazen


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.