FreeRTOS+TCP is still in the lab
FreeRTOS+TCP is already used in
commercial products and we encourage
you to try it yourself.
Be aware however that we are
still refining its design, and the
source code and documentation do not
yet meet Real Time Engineers Ltd's strict quality standards.
Please use the forum for support,
feedback and ideas,
or contact us directly if you have a specific business interest.
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
for FreeRTOS_CreateSocketSet() to be available.
Socket Sets allow an application RTOS task to block on multiple sockets
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 of the sockets have an event
If FreeRTOS_select() returns a non-zero value then check all
sockets in the set using a call to FreeRTOS_FD_ISSET()
to determine which events are pending.
The FreeRTOS_FD_CLR() API function is used to
remove a socket from a socket set.
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.
See the example on the FreeRTOS_select()