What exactly does the Nagle algorithm do?
It groups together as much data as it can between ACK's from the other
end of the connection. I found this really confusing until Andrew
Gierth (firstname.lastname@example.org) drew the following diagram, and
This diagram is not intended to be complete, just to illustrate the
Case 1: client writes 1 byte per write() call. The program on host B
is tcpserver.c from the FAQ examples.
APP TCP TCP APP
[connection setup omitted]