lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] RAW Api to receive large image data


From: Sergio R. Caprile
Subject: Re: [lwip-users] RAW Api to receive large image data
Date: Fri, 04 Jul 2014 10:18:55 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi nkumar,
on reception, you won't ALWAYS receive a single pbuf, but probably a
chained pbuf.
This means, you have to ALWAYS look for p->tot_len, not just p->len, to
actually get ALL the data you were sent.
To extract ALL data in a pbuf chain, use pbuf_copy_partial(), it is
easier than travelling the pbuf chains: pbuf_copy_partial(p, towhere,
p->tot_len, 0);
To ACK all the data: tcp_recved(tpcp, p->tot_len);
Regards




reply via email to

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