address@hidden 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