[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] What's the max value of MEMP_NUM_NETCONN?
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] What's the max value of MEMP_NUM_NETCONN? |
Date: |
Wed, 24 Nov 2010 14:13:41 +0000 |
On 24 Nov 2010, at 08:45, runjin wrote:
> What's the max value of MEMP_NUM_NETCONN?
> Can I set it to 8192 ?
I doubt anyone has tried such a large value with lwIP. It might be possible,
but it wouldn't be efficient; lwIP just hasn't been written to scale well with
the number of sockets. There are places in the code for example that do linear
searches of lists of connections, and if the lists grew that long it would take
a long time.
> Does lwip_select support more 8192 connections?
In what sense. The select() API generally only allows you to add a few sockets
to each select set as they are represented by bit masks. I can't remember off
hand how many lwIP supports but it's more like 32 rather than 8192. This is
just the way the sockets API is defined, rather than a restriction in lwIP
(although again lwIP's implementation of select is unlikely to be among the
most efficient). For larger numbers of sockets epoll() or similar would be a
better choice, but lwIP does not currently support that.
Kieran