Paul Plankton wrote:
So when I do not want the window to be enlarged, I call this function not with
the amount of data received but with a fixed value? E.g. with the window size
like it is defined in lwipots.h?
I'm not sure I understand your question.
For a working TCP connection, you'll have to call 'tcp_recved()' eventually.
The amount of bytes (coutn value) you pass to this function has to be the exact
length of the received data or things will go wrong at some point.
Now you have the option to throttle the sender by only sending a full window of
data until you are ready to process more data (in your application, the stack
internals tell the remote host they have processed the data by sending an ACK,
no a window update).
This is done by *not* calling 'tcp_recved()' directly from the recv callback
but at a later point (watch out for threading issues here!).
However, you *always* must keep the byte count correct, you cannot just pass in
any constant value!
Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users