[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Partial read on receive callback
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] Partial read on receive callback |
Date: |
Fri, 13 May 2011 09:41:37 +0100 |
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 from the network interface?
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 interested in until
you've got enough to process. 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 the stack will be allowed to reuse those buffers.
Kieran
- [lwip-users] Partial read on receive callback, Enrico Murador - Research & Development - CET, 2011/05/13
- Re: [lwip-users] Partial read on receive callback,
Kieran Mansley <=
- Re: [lwip-users] Partial read on receive callback, Enrico Murador - Research & Development - CET, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Kieran Mansley, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Tomas Hruby, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Bill Auerbach, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Simon Goldschmidt, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Bill Auerbach, 2011/05/13
- Re: [lwip-users] Partial read on receive callback, Enrico Murador - Research & Development - CET, 2011/05/16
Re: [lwip-users] Partial read on receive callback, Simon Goldschmidt, 2011/05/13