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

◆ nrf_cloud_coap_disconnect()

int nrf_cloud_coap_disconnect ( void  )

#include <include/net/nrf_cloud_coap.h>

Disconnect the nRF Cloud CoAP connection.

This does not teardown the thread in coap_client, as there is no way to do so. The thread's call to poll(sock) will fail, resulting in an error message. This is expected. Call nrf_cloud_coap_connect() to re-establish the connection, and the thread in coap_client will resume.

Returns
0 if the socket was closed successfully, or a negative error number.