Thanks for your answer. Is it necessary to not free the pbufs? Because
I save the input data in an extra buffer and not in the pbufs. Is it not
enough to just not call the tcp_recved function?
Actually I'm want to send something like: No more data please. Is there
no possibility with TCP?
Because currently I send raw data over TCP and I can't flow control on
top of TCP.
Thanks for your help!
On Thu, 15 Jul 2010 07:23:49 +0200, Simon Goldschmidt wrote:
[email protected] wrote:
I have the following problem and question:
I use LWIP with an arm microcontroller and the application has an active
TCP connection.
Now the question is how can I protect from an overflow of received data?
The only option you have is to not update the window (i.e. don't call
tcp_recved until you have more buffer space available). However, this means
that you have to be prepared to buffer a full tcp window (by not freeing the
pbufs passed to your recv callback function until you processed them - and not
calling tcp_recved). Everything else you need regarding flow control has to be
implemented in your application protocol, i.e. on top of tcp.
Simon
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users