[FreeRTOS Embedded IP Stack API]
BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet );
Add a socket to a socket set.
Socket Sets allow an application task to block when reading from multiple sockets at the same time. Instead of blocking on an individual socket, a task instead blocks on the set.
To use a socket set:
Create a socket set by calling FreeRTOS_CreateSocketSet().
A socket set is equivalent to the Berkeley sockets fd_set type.
Add one or more sockets to the set using calls to FreeRTOS_FD_SET().
FreeRTOS_FD_SET() is equivalent to the Berkeley sockets FD_SET() macro.
Call FreeRTOS_Select() to test the sockets in the set to see if any contain data that is
waiting to be read.
- Read from the socket returned by FreeRTOS_select() (if any) using a call to FreeRTOS_recvfrom() as normal.
FreeRTOS_FD_CLR() removes a socket from a set.
The socket being added to the set.
The socket set to which the socket is being added.
If the socket was added to the set then pdPASS is returned. If the socket was not added to the set because it is already a member of a set then pdFAIL is returned.
See the example on the FreeRTOS_select() documentation page.