lwip-users
[Top][All Lists]
Advanced

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

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


From: Enrico Murador - Research & Development - CET
Subject: Re: [lwip-users] Partial read on receive callback
Date: Mon, 16 May 2011 11:33:58 +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

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 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 tha httpd to allow request packets to be spanned accross multiple packets. I'm essentially doing the same thing as you do there.

 

I see 2 big differences – my implementation deletes pbufs as each one is exhausted of data and I don’t need to keep track of where in the pbuf I’m resuming from.  Each call for len bytes returns len bytes and the next read is at byte len+1.

 

It would be nice if there were a sanctioned method to do what I did since I see it as very common to want to know how much is received and then read part of or all of that amount when it’s large enough to read.

 

Bill

 

_______________________________________________ lwip-users mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/lwip-users

--
Enrico Murador
R&D

CET
                    Electronics logo CET Electronics
via E. Fermi, 1
31050 Zenson di Piave (TV)
Italia
Phone: +39 0421 344100
Fax: +39 0421 464042
Web: http://www.cet-electronics.com/




reply via email to

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