[Top][All Lists]

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

Re: [lwip-users] pbuf proccessing in another thread

From: Kieran Mansley
Subject: Re: [lwip-users] pbuf proccessing in another thread
Date: Thu, 08 Apr 2010 11:09:11 +0100

On Thu, 2010-04-08 at 12:00 +0200, ncoage wrote:

> But I must do something with the data that cannot be put on queue. I
> should copy the data to a separate buffer or concatenate this pbuf
> with the pbuf chain (stored in the server state variable)?

You shouldn't need to copy it: you can just store the pbuf until you can
use the data in it, and then call tcp_recved().

> > tcp_recved for data that it has put on the queue; this would keep the
> > TCP receive window closed until it is ready for more data but not
> > require a 200 byte TCP window which would be very bad for network
> > performance.  You can use tcp_poll() to get a periodic callback to allow
> The minimum interval between tcp_poll calls is 250ms, and I'm
> wondering if this is not too much.

It probably is, given that your queue is just 200 bytes long.  Perhaps
you could arrange for the OS to call you more frequently and use
tcpip_callback() to get into the right context (if necessary - I'm not


reply via email to

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