![]() |
nrfxlib API 3.3.99
|
| 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.
| enabled | Whether to enable or disable data. |
| 0 | on success. |
| -1 | on error, and set errno to indicate the reason. |