lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Re: Struggling to build a TCP echo server (Kieran Mansl


From: Kieran Mansley
Subject: Re: [lwip-users] Re: Struggling to build a TCP echo server (Kieran Mansley)
Date: Tue, 17 Feb 2009 11:27:35 +0000

On Fri, 2009-02-13 at 13:53 -0500, Chen wrote:
> Kieran, Thanks for your reply!
> 
> What is the rule of thumb to allocate enough PCBs to handle multiple
> connections?

There isn't one really.  It depends on your application and the sort of
traffic you expect to handle, and how important it is that you never
miss a connection, and so on.  A good approach is to use the lwip debug
stats to see which resources you're running out of, and then increase
that, and see how things work then.

> Any dos and donts for using lwIP in threads?

The most simple answer is "don't".  There are of course ways to do it,
but if you're not sure about how to write threads to avoid concurrent
access to a shared resource then it's probably best to avoid them
altogether.  lwIP isn't special in this regard - it's just something
that mustn't be accessed by two threads at once.

Kieran






reply via email to

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