TTCP: Test TCP
https://en.wikipedia.org/wiki/Ttcp
https://github.com/huntinux/pnp/blob/master/ttcp/ttcp.cc
http://stackoverflow.com/questions/1756811/does-gccs-attribute-packed-retain-the-original-ordering
在使用struct描述网络包的时候,使用“__attribute__(packed)”能保证struct中的member之间没有gap:
struct packet { uint8_t x; uint32_t y; } __attribute__((packed)); // sizeof 为 5 struct packet { uint8_t x; uint32_t y; } ; // sizeof 为 8