[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: Joel Cunningham
Subject: Re: [lwip-devel] Removing the restriction on number of sockets
Date: Wed, 09 Aug 2017 08:59:54 -0500

On Aug 9, 2017, at 2:30 AM, Stian Skjelstad <address@hidden> wrote:

Since FD numbers are shared among threads in LwIP (everything is basically one process),

This is an important difference between LwIP on an RTOS and Linux.  In Linux each process’ FDs will start at 0 and the application won’t have to worry about not fitting within fd_set unless the use case is for a large number of sockets, in which case the can detect/handle the issue.

In an RTOS, where you have multiple networking applications (which would typically be their own processes on Linux) but each are simply threads in the same process space, now a thread’s first call to socket() could return an FD larger than what FD_SETSIZE can hold rather than 0.  This would require modifying all applications to expect FDs that couldn’t fit within fd_set even when they are only using a small number of sockets


reply via email to

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