nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_setsockopt()

int nrf_setsockopt ( int socket,
int level,
int option_name,
const void * option_value,
nrf_socklen_t option_len )

#include <nrf_modem/include/nrf_socket.h>

Set the socket options.

See POSIX.1-2017 article for normative description.

Note
In Modem library this function supports a subset of socket options described by POSIX, but also some additional options.

In addition, the function may return -1 and set the following errno:

  • [NRF_EAGAIN] The option could not be set when requested, try again.
  • [NRF_EDESTADDRREQ] The socket option NRF_SO_RAI with value NRF_RAI_NO_DATA cannot be set on a socket that is not connected.
  • [NRF_EOPNOTSUPP] The option is not supported with the current socket configuration.
  • [NRF_ESHUTDOWN] Modem was shut down.