lwip:与tcp发送相关的选项和函数

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。

原文地址:https://www.cnblogs.com/byeyear/p/3529273.html