1. 禁用Nagle
tpcb->flags |= TF_NODELAY
2. tcp_write僅enqueue packet,而不會啟動發送。
在tcp_write后調用tcp_output立即啟動發送(See comments of the tcp_write function)。
3. tcp_write的最后一個參數:
* - TCP_WRITE_FLAG_COPY (0x01) data will be copied into memory belonging to the stack
* - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will be set on last segment sent,
4. TCP_OVERSIZE
試圖將待發送數據拼接到上一次的非全長包中。何時拼接由TCP_OVERSIZE的值確定,see opt.h for details。