sppDisc()
PROTOTYPE
#include <spp.h>
int sppDisc(void);
DESCRIPTION
sppDisc() terminates a connection. If the channel is already disconnected when it is called, the call succeeds and returns immediately. Otherwise, it sends a RST frame and puts the connection in the CLOSED state.
If successful, sppDisc() returns 0. Otherwise, it sets errno and returns -1.
ERROR CODES
| SPB_UNINITIALIZED | The initialization routine sppInit() has not been called. |
EXAMPLE
/*-------------------------------------------------------------------*/
/* Wait for all sent data to be ACKED and then close the connection. */
/*-------------------------------------------------------------------*/
sppAllAcked();
sppDisc();