|Subject:||Re: [lwip-devel] Removing the restriction on number of sockets|
|Date:||Wed, 9 Aug 2017 09:30:39 +0200|
2017-08-08 23:09 GMT+02:00 Stian Skjelstad <address@hidden>:
> Apart from that, the "fd_set" issue still remains to be solved. The only way
> I can think of to fix it is to make "fd_set" an array of sockets instead of
> a bitfield (FD_SET adds an element, FD_CLR and FD_ISSET have to iterate the
> set). However, that would mean there's either an upper limit on sockets in
> such an fd_set: what does FD_SET do if the maximum number is reached?
> Assert-fail? Use the heap to allocate more memory?
> UNIX systems where you can adjust the fd limit to be bigger than the default
> size of a fdset, it is common to use the poll() api instead in order to be
> cross platform. At least that is my experience from using the socket API.
Is fd_set used for other purpose than calling select()? If not, we
should be able to continue using the current bitfield, as it only
limits the number of sockets used in one call to select(), not the
amount of sockets available.
I did a quick research to know whats the value of FD_SETSIZE on other
systems. In Linux it is 1024, and 256 in the Hurd. In LwIP, the
user can set FD_SETSIZE in cc.h based on the target resources, right?
|[Prev in Thread]||Current Thread||[Next in Thread]|