lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Receiving part of a pbuf chain


From: Chris Frost
Subject: [lwip-users] Receiving part of a pbuf chain
Date: Sat, 22 Jan 2005 11:54:50 -0800
User-agent: Mutt/1.3.28i

I'm using the lwip callback api (I believe this is it's name, tcp_new,
tcp_bind, et al) and have written a simple multi-process wrapper using
this api. In my function given to tcp_recv(), I currently take all of the
data in the pbuf chain and pass it on to the client process using a fifo.
However, if this client process is slower than the network, the fifo's
buffer will fill and the lwip wrapper process will block while writing
to slow process' fifo, making lwip unresponsive for other applications
for a decent period of time.

So, my question is, is it possible to receive only some of a pbuf
chain, to have the remainder of the chain put back into lwip's queue
so that it is redelivered to this pcb's recv function?

This would allow the lwip wrapper process to not block for long
periods while waiting for slow processes. I've looked into api/ some,
but wasn't able to find code doing similar things. I've also tried
calling tcp_recved() on only the amount of data passed on to the
client process (and for now, not calling pbuf_free() on the pbuf
chain), but this appeared to slow the connection to a stop. (For this
test I tcp_recved() only the first link in the pbuf chain.)


Any thoughts or suggestions would be great, thank you!
-- 
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email address@hidden with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>




reply via email to

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