lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] tcp_input: order of processing question/comment


From: bill
Subject: [lwip-devel] tcp_input: order of processing question/comment
Date: Wed, 4 Feb 2009 11:45:06 -0500

Currently In tcp_input, towards the end of the function, the tcp_recv callback is called and if there is no error returned, tcp_output is called to process any pending outgoing data.

The questions are: Why would we want an error returned by the receive callback to prevent us from sending any pending data?  Wouldnt we still want to send queued ACKs or queued data?

The comment is: It would seem to be better to call tcp_output *before* calling the tcp_recv callback.  This would allow the other end of the connection to process any data that may be sent in that call while the lwIP side goes off and processes its data in the receive callback. In my bandwidth testing I do see slightly better performance by adding a tcp_output call before the receive callback.

Bill


reply via email to

[Prev in Thread] Current Thread [Next in Thread]