lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] protect from overflow of received data


From: mgroups
Subject: Re: [lwip-users] protect from overflow of received data
Date: Thu, 15 Jul 2010 11:49:06 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.4) Gecko/20100608 Lightning/1.0b2 Thunderbird/3.1

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:
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





reply via email to

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