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。

相关文章:

  • 2021-11-23
  • 2021-05-30
  • 2021-05-12
  • 2021-06-12
  • 2022-12-23
  • 2022-03-04
  • 2021-07-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2021-09-20
  • 2021-08-22
  • 2022-12-23
相关资源
相似解决方案