nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_cloud_coap_pause()

int nrf_cloud_coap_pause ( void  )

#include <include/net/nrf_cloud_coap.h>

Pause CoAP connection.

This function temporarily pauses the nRF Cloud CoAP connection so that another DTLS socket can be opened and used. Once the new socket is no longer needed, close it and use nrf_cloud_coap_resume() to resume using CoAP. Do not call nrf_cloud_coap_disconnect() nor shut down the LTE connection, or the requisite data for the socket will be discarded in the modem, and the connection cannot be resumed. In that case, call nrf_cloud_coap_connect(), which results in a full DTLS handshake.

Return values
-EACCESif DTLS CID was not active or the connection was not authenticated.
-EAGAINif an error occurred while saving the connection; it is still usable.
-EINVALif the operation could not be performed.
-ENOMEMif too many connections are already saved (four).
0If successful.