Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Simon Goldschmidt
Michael Steinberg wrote: > Oh, and wait for the update that fixes leaking tcp_ucbs on remote-close > with this approach, hehe. Or did this land already? Bug #51937 has been fixed in master, yes. This ans some other fixed bugs make me think of releasing a tiny-fix 2.0.3 version soon... Simon

Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Michael Steinberg
Hello, My proposal: Chain up the handed pbufs in the recv callback ("push_back", instead of handling) to a private chain of pending data, and call tcp_recved with the amount of bytes you consume from this received-chain at your own discretion at some other point in time (and be sure to free

Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Simon Goldschmidt
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

Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Paul Plankton
OK, I have read this manual but on a third party webpage, that's why I did not really trusted the explanation :-o 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

Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Simon Goldschmidt
Paul Plankton wrote: > So what does tcp_recved() do? RTFM :-) >From >http://www.nongnu.org/lwip/2_0_x/group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44 "This function should be called by the application when it has processed the data. The purpose is to advertise a larger window when the

Re: [lwip-users] Handle received data only partial

2017-09-12 Thread Paul Plankton
Hm, OK, thanks for the feedback. I thought tcp_recved() could be what I'm looking for but it seems not. Btw: what is this function used for exactly? At the moment I always hand over the total received data length but in parrallel also release the pBuf. So what does tcp_recved() do? 2017-09-08