[comp.protocols.tcp-ip] Nagle's algorithm

ljm@FTP.COM (leo j mclaughlin iii) (05/04/91)

>  ...we use a timer to distinguish between an
>escape-sequence and the escape-key.  Dispite dire warnings, we have
>found that this works across the Internet for *most* people.  The
>reason it works, from my inspection of packets, is that, most of the
>time, Telnet/TCP puts the entire escape sequence into a single packet,
>so no matter how long it spends traversing the network, our timer
>works...
>   We have recently run into a system that seem to purposely break the
>escape sequence up...
>   My question is:  How common is this?  Where did this "feature" come
>from?  Are more or fewer systems going to behave like this in the
>future?...

Bad news.  As more and more well behaved TCPs are fielded, you will see
systems exhibiting this behavior become more common.  What you are running
into is a combination of Nagle's algorithm for TCP writes and a telnet which
is sending the escape sequence character by character to the network.
Basically, Nagle's algorithm says 'Don't clog the network the network with
little packets.  If you have data pending acknowledgement (in your case the
ESC) and don't have a MTU-full of data queued (in your case the rest of the
escape sequence) don't send anything.'

So, not only is the telnet breaking the escape sequence into different
packets, the TCP is saying don't send the rest of the sequence until the
ESC is acknowledged.

enjoy,
leo j mclaughlin iii
ljm@ftp.com