SocketSet_t FreeRTOS_CreateSocketSet()( unsigned BaseType_t uxEventQueueLength );
Create a socket set for use with the FreeRTOS_select() function. ipconfigSUPPORT_SELECT_FUNCTION must be set to 1 in FreeRTOSIPConfig.h for FreeRTOS_CreateSocketSet() to be available.
Socket Sets allow an application RTOS task to block on multiple sockets
simultaneously.
To use a socket set:
The FreeRTOS_FD_CLR() API function is used to remove a socket from a socket set.
Parameters:
| uxEventQueueLength |
A receive event is generated each time a socket in the
socket set receives data. uxEventQueueLength sets the
maximum number of receive events that can be stored by
the socket set at any one time.
If a packet is received by a socket that is a member of a socket set, and the socket set's event queue is full, then the packet will be dropped.
|
If the socket set was created then a handle to the created socket set is returned. If the socket set was not created (because there was insufficient FreeRTOS heap memory available) then NULL is returned.
Example usage:
See the example on the FreeRTOS_select() documentation page.