lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Partial read on receive callback


From: Enrico Murador - Research & Development - CET
Subject: [lwip-users] Partial read on receive callback
Date: Fri, 13 May 2011 10:36:11 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

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 I can find (into currently received data) and leave the remaining bytes on the TCP buffering system.
I think this could be done by calling, into receive callback, tcp_recved() giving only the number of bytes I
have already parsed. I think also that lwip tries to free the packet buffers no more used, leaving some space
for more data...

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?

Thank you
Enrico


reply via email to

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