tcp_abort() — Abort the connection


void tcp_abort (struct tcp_pcb *pcb );


Aborts the connection by sending a RST (reset) segment to the remote host. pcb is deallocated. This function never fails.

If a connection is aborted because of an error, the application is alerted of this event by the callback previously registered with tcp_err(). Errors that might abort a connection are when there is a shortage of memory.