Function openthread_sys::otTcpAbort

source ·
pub unsafe extern "C" fn otTcpAbort(
    aEndpoint: *mut otTcpEndpoint
) -> otError
Expand description

Forcibly ends the TCP connection associated with this TCP endpoint.

This immediately makes the TCP endpoint free for use for another connection and empties the send and receive buffers, transferring ownership of any data provided by the application in otTcpSendByReference() and otTcpSendByExtension() calls back to the application. The TCP endpoint’s callbacks and memory for the receive buffer remain associated with the TCP endpoint.

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

@retval OT_ERROR_NONE Successfully aborted the TCP endpoint’s connection. @retval OT_ERROR_FAILED Failed to abort the TCP endpoint’s connection.