On 1 May 2012, at 21:10, Bill Auerbach wrote: > Is it acceptable or incorrect to call tcp_recved from the receive callback > even if the pbuf isn’t freed? I am buffering pbufs in the callback until I > have enough to process what has come in. This buffering could be in the > hundreds. There’s no memory limit – I have 6000 pbufs preallocated.
I think it is best to wait until you're returning the pbuf to the stack. tcp_recved() will indicate to the other end that it can now send more data by increasing the window size. If you're holding all the pbufs lwIP might be forced to drop packets when they arrive. If you wait until you free the pbufs then the window size will more accurately reflect the amount of buffering available. Kieran _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
