"Shuqing Wu" <ca> wrote in message
The client isn't being smart about the amount of data it passes to the
stack at a time. When the stack sees the first send, it has no idea there's
going to be a second, so it sends the data immediately. When it sees the
second send, it has no idea there isn't going to be a third, so it delays
the data by about 200 milliseconds or so.
The solution is for programs that send data over TCP to properly manage
their transfer of data from the application to the network stack. For
example, if you have to send three lines of data at the same time, send them
in one call to 'send' or 'write' rather than in three. Here, 'at the same
time' means 'without having to wait for anything in-between them'.