openthread_sys

Function otTcpEndpointDeinitialize

Source
pub unsafe extern "C" fn otTcpEndpointDeinitialize(
    aEndpoint: *mut otTcpEndpoint,
) -> otError
Expand description

Deinitializes this TCP endpoint.

This means that OpenThread no longer keeps track of this TCP endpoint and deallocates all resources it has internally allocated for this TCP endpoint. The application can reuse the memory backing the TCP endpoint as it sees fit.

If it corresponds to a live TCP connection, the connection is terminated unceremoniously (as in otTcpAbort()). All resources the application has provided for this TCP endpoint (linked buffers for the send buffer, memory for the receive buffer, the @p aEndpoint structure itself, etc.) are immediately returned to the application.

@param[in] aEndpoint A pointer to the TCP endpoint structure to deinitialize.

@retval OT_ERROR_NONE Successfully deinitialized the TCP endpoint. @retval OT_ERROR_FAILED Failed to deinitialize the TCP endpoint.