A TCP socket that is not connected can be closed using the
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.
A TCP socket that is connected should not be closed until the
connection has been shut down. To gracefully shut down a socket first
then wait for read attempts on the socket to return FREERTOS_EINVAL, indicating
that the socket is no longer connected.
The source code examples on both the
Sending TCP Data
and the Receiving TCP Data pages demonstrate a connected
socket being shut down then closed.
Back to the RTOS TCP networking tutorial index