TTCP
https://en.wikipedia.org/wiki/Transmission_Control_Protocol
implementations and dertvatives: Iperf
What performmance do we care?

- 带宽
- 吞吐量
- 延迟
- 资源使用率
额外开销
基于常用的Socker API
- TTCP协议有格式的; echo通常是接受什么, 发送什么, 忽略TCP的格式
- 使用TCP的典型协议
- 可以使用多种语言实现
- 没有并发连接
The Protocol
请求-响应协议
- 收到Ack, 才会返回Payload
The Code

Straight forward with blocking IO/ 直线型阻塞IO
- muduo/blob/master/examples/ace/ttcp/ttcp_blocking.cc
- C with sockets API
- recipes/blob/master/tpc/bin/ttcp.cc
- C++ with a thin wrapper
- muduo-examples-in-go/blob/master/examples/ace/ttcp/ttcp.go
Non-blocking IO with muduo library
- muduo/blob/master/examples/ace/ttcp/ttcp.cc
代码复杂, 性能并未提升
None of above support concurrent connections
- Pretty easy to anable, thread-per-connections for first three
不支持并发连接

