net.py & Telnet negotiation update
Brazen <odbrazen-/[email protected]>
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
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 __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash ------------------------------------------------------- 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