Skip to content

Telnet/Putty Preamble

February 5, 2016

16:22:52.174> s0 stat change to 0017
16:22:52.253> Hello to:
16:22:53.469> rsize=21: FFFB1F FFFB20 FFFB18 FFFB27 FFFD01 FFFB03 FFFD03
16:22:54.680> rsize=15: FFFE1F FFFE20 FFFE18 FFFE27 FFFC01
16:22:55.862> rsize=3: FFFB24
16:22:57.113> rsize=3: FFFE24

When a session is established putty sends a negotiation sequence consisting of sequences of 3 bytes like FFFB1F which means the client WILL tell you the window size if you ask.  If I don’t respond it sends a related sequence like FFFE1F which means(I think) DONT ask for window size.  I don’t care about any of this stuff but it takes bandwidth and i have to recognize it to ignore it.  I tried just waiting a second and flushing the receive buffer but somehow it knows when i’ve read the first transmission and waits before it sends the next.  I’m having visions of adopting this horrible pattern that i see in the arduino ethernet code.  It makes the ethernet socket look like a character input device and just reads one byte at a time.

I can see making something like a tgetchar() that would return a character or block if none were available and would just swallow the initialization sequences.  I could have a tgetavailable() to tell me if there were characters available MAYBE but that would be trickier.


From → telnet, web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: