lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Query amount of free buffers


From: address@hidden
Subject: Re: [lwip-users] Query amount of free buffers
Date: Sun, 21 Mar 2010 13:27:05 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

Marco Jakobs wrote:
This is not so easy as i'm using the LwIP access in different tasks from
the LwIP task, and the socket API is not thread-safe. So the netconn API
is the most convenient way (and also working really smooth).
The netconn API is no more thread-safe than the netconn API: The lack of thread-safety (which is really only a lack of full-duplex thread-safety) in the socket API comes from the fact that it uses the netconn API. As long as you are only using one socket from one thread at a time, there is not problem.

However, with nonblocking-write, the problem should be solved with the netconn API as well.
But in this case we *have* still all buffers full.
Not really: these are only the per-connection limits that are reached. That doesn't mean all buffers are used. Other connections (or UDP) may still use more buffers. lwIP TCP has 2 limits per connection: the number of pbufs enqueued (TCP_SND_QUEUELEN) and the number of bytes enqueued (TCP_SND_BUF). Both may be configured much smaller than the actual available buffers!

Simon




reply via email to

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