added test code for measuring throughput.

Use this with a delay injection in  the loop back interface:

  $ sudo tc qdisc add dev lo root netem delay 100ms

To reset the delay and bring it back to normal:

  $ sudo tc qdisc del dev lo root

Query current status:

  $ sudo tc -s qdisc ls dev lo
Increasing the window size.

After experimenting and a bit of back-of-the-envelope calculation, I think a modern network would require a larger window size.
doc improvement
Avoid creating a huge Chunk.

Single chunk that uses up the entire pipe window forces the sender to pause until it sees an Ack back.

See the added comment in the code for more details.
Disabling Nagel's algorithm
A better way to avoid fragmentation.

This doesn't induce unnecessary Thread.sleep
Adding buffering.

It's not clear whether