Platform API Reference
Platform portability layer

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.
IotNetworkError_t
IotNetworkError_t
Return codes for network functions.
Definition: iot_network.h:43