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: Bill Auerbach
Subject: Re: [lwip-users] Partial read on receive callback
Date: Fri, 13 May 2011 14:25:06 -0400

> 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

 


reply via email to

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