Re: [lwip-users] Partial read on receive callback

2011-05-16 Thread Enrico Murador - Research & Development - CET
Thank you for your tips, I think I'll make something similar... Enrico On 13/05/2011 20.25, Bill Auerbach wrote: > I don't want to be picky, but this is potentially confusing to beginners: it should be named

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Bill Auerbach
> I don't want to be picky, but this is potentially confusing to beginners: it should be named receive callback, as tcp_recved() is a function which does something totally > different ;-) Being clear is not being picky - thanks for making it clearer. > Yep, I introduced that when changing

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Simon Goldschmidt
"Bill Auerbach" : > My tcp_received takes the incoming pbufs > I don't want to be picky, but this is potentially confusing to beginners: it should be named receive callback, as tcp_recved() is a function which does something totally different ;-) > Actually, I just checked and there is (is it

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Bill Auerbach
nongnu.org Subject: Re: [lwip-users] Partial read on receive callback Dear Kieran, Thank you for the reply. The callback won't be called again until there is new data, and the data passed to the callback will only be the new data; it won't (I think) pass you the data you've been g

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Enrico Murador - Research & Development - CET
Ok, now it's very clear and I have a couple of options to try... Thank you all for your support! Enrico On 13/05/2011 11.54, Simon Goldschmidt wrote: Kieran Mansley wrote: You don't need to copy it, as this is the point of tcp_recved() - it allows you to keep hold of the data until you've fin

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Simon Goldschmidt
Kieran Mansley wrote: > You don't need to copy it, as this is the > point of tcp_recved() - it allows you to keep hold of the data until > you've finished with them, even if that's not straight away during the > callback. Once you've processed and finished with the data, call > tcp_recved() and t

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Tomas Hruby
On Fri, May 13, 2011 at 11:13:46AM +0200, Enrico Murador - Research & Development - CET wrote: > Dear Kieran, > Thank you for the reply. > >The callback won't be called again until there is new data, and the data > >passed to the callback will only be the new data; it won't (I think) > >pass you t

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Kieran Mansley
On Fri, 2011-05-13 at 11:13 +0200, Enrico Murador - Research & Development - CET wrote: > It is ok for me to keep the data on the packet buffers, but I'm > concerned with the > possibility that at the end of the buffer chain I will find a > "partial" > message; in that > case, If I understand wel

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Enrico Murador - Research & Development - CET
Dear Kieran, Thank you for the reply. The callback won't be called again until there is new data, and the data passed to the callback will only be the new data; it won't (I think) pass you the data you've been given already as you were hoping. I'm afraid you have to create a list of the data you

Re: [lwip-users] Partial read on receive callback

2011-05-13 Thread Kieran Mansley
On Fri, 2011-05-13 at 10:36 +0200, Enrico Murador - Research & Development - CET wrote: > The question is: if I leave some data unread when exiting the receive > callback, when I should suppose the receive callback > will be called again? Do I have to wait another TCP packet (or event) > sent fro

[lwip-users] Partial read on receive callback

2011-05-13 Thread Enrico Murador - Research & Development - CET
Hi all, I'm using LWIP with TCP and callback API. I'm writing code to parse a sequence of messages, sent serially to my board and embedded into one (or more) TCP packets. It could be useful to me, when processing received data into receive callback function, to parse only the complete messages