[Top][All Lists]

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

Re: [lwip-devel] Removing the restriction on number of sockets

From: Stian Skjelstad
Subject: Re: [lwip-devel] Removing the restriction on number of sockets
Date: Tue, 8 Aug 2017 23:09:07 +0200

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.

Stian Skjelstad

reply via email to

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