FreeRTOS: Platform
Platform portability layer
Return to main page ↑

Close a network connection.

IotNetworkError_t ( * close )( void * pConnection );

This function closes the connection, but does not release the resources used by the connection. This allows calls to other networking functions to return an error and handle a closed connection without the risk of crashing. Once it can be guaranteed that pConnection will no longer be used, the connection can be destroyed with IotNetworkInterface_t::destroy.

In addition to closing the connection, this function SHOULD also remove any active receive callback.

Parameters
[in]pConnectionThe network connection to close, defined by the network stack.
Returns
Any IotNetworkError_t, as defined by the network stack.
Note
It MUST be safe to call this function on an already-closed connection.