Hello all,

I'm using lwip 2.1.2 in non-OS / non-threaded mode (main loop mode) with raw API to send/receive TCP packets.

When sending packets with tcp_write() I'd like to use zero copy mechanism. Therefore I need to keep the pbuf objects until the buffer has been sent and acknowledged by the recipient. When acknowledged, my callback registered by tcp_sent() is called:

static err_t

TCPSERVER_sentCallback(

        void                        * arg,

        struct tcp_pcb                * tcpPcb,

        uint16_t                    length) {

   // remove pbuf which are reported as "sent"
   ...
}

Is "length" always matching a single pbuf length or could it happen that TCPSERVER_sentCallback() reports multiple pbuf objects at once?

Also, can I assume, that TCPSERVER_sentCallback() is called in the order the packets have been sent?


Thank you for reading,

Paul
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to