sppAllAcked()
PROTOTYPE
#include <spp.h>
int sppAllAcked(void);
DESCRIPTION
sppAllAcked() checks if all previously sent data frames have been received (acknowledged) by the peer. If non-blocking mode has been set, sppAllAcked() returns immediately. Otherwise, the call blocks until all previously sent data frames are acknowledged or the link is reset.
If successful, sppAllAcked() returns 0. Otherwise, it sets errno and returns -1.
ERROR CODES
| SPP_UNCONNECTED | The channel is unconnected. |
| SPP_UNINITIALIZED | The initialization routine sppInit() has not been called. |
| SPP_WOULD_BLOCK | API is non-blocking and unacknowledged data frames exist. |
EXAMPLE
/*-------------------------------------------------------------------*/
/* Wait for all sent data to be ACKED and then close the connection. */
/*-------------------------------------------------------------------*/
sppAllAcked();
sppDisc();