show a more interesting example
use bash so RANDOM works
make the last process blocking instead of using wait
add timestamped log function
start the first send after timeout 0
remove unused variables
fix - don't write data again on drain
improve logging slightly
fix, function typo
reimplement to fix case of finishing one chunk and starting in same send

(need_len - 2) did not take into account the data written to finish the
previous chunk