ot::Ip6::Tcp::Endpoint::Abort() method
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() calls back to the application. The TCP endpoint's callbacks and memory for the receive buffer remain associated with the TCP endpoint. @sa otTcpAbort
Return value
kErrorNone Successfully aborted the TCP endpoint's connection. kErrorFailed Failed to abort the TCP endpoint's connection.