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。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM