nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_socket_data_enabled_set()

int nrf_socket_data_enabled_set ( bool enabled)

#include <nrf_modem/include/nrf_socket.h>

Enable or disable data traffic through the socket interface.

This function can be used to disable all data traffic through the socket interface.

When enabled is set to false, all sockets are closed and no new sockets can be opened. DNS operations are also disabled. The affected functions indicate an error and set errno to NRF_EACCES when data is disabled.

Parameters
enabledWhether to enable or disable data.
Return values
0on success.
-1on error, and set errno to indicate the reason.