huin/mqtt — pull request #3 by jeffallen (2013-08-22 08:52:01+00:00)
Title: Reduce write system calls, thus fewer TCP packets

Do a bit more copying around in user space before handing off
the data to the kernel, so that TCP sends fewer packets.

Before this change, one connect, publish and disconnect
was 19 packets. After this change, it is 14 packets.
Ethernet/IP/TCP overhead is about 66 bytes. So with this
change, we use 73% of the bandwidth as before
(14*66/19*66 = 0.73).