On Mon, 2009-07-27 at 06:39 -0700, JM wrote:
> 
> -If I have space in my buffer, I take the data, then call tcp_recved()
> and pbuf_free().

Yes.

> -If there currently is not enough space in my buffer, I store the pbuf
> pointer for later.  I haven't tried this yet, but should I also call
> tcp_recved() with len=0?

No need to call tcp_recved in that case.

> -I periodically check if there's space in my buffer.  When there is, I
> retrieve the data from the pbuf pointer I stored.  Then I call
> tcp_recved() and pbuf_free().

Yes.  Make sure you handle a chain of pbufs, not just a single one (i.e.
look at pbuf->tot_len and pbuf->next)

> I had planned on using tcp_poll() to do the periodic buffer checking,
> but it's a little slow (500ms).  Is it Ok if I instead do this in the
> ethernet/periodic interrupt before lwIP runs

Don't know.  Probably.

Kieran



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to