Function nrfxlib_sys::nrf_setsockopt[][src]

pub unsafe extern "C" fn nrf_setsockopt(
    sock: c_int,
    level: c_int,
    optname: c_int,
    p_optval: *const c_void,
    optlen: nrf_socklen_t
) -> c_int

Function for setting socket options for a given socket.

s The options are grouped by level, and the option value should be the expected for the given option, and the lifetime must be longer than that of the socket.

  • sock - The socket for which to set the option.
  • level - The level or group to which the option belongs.
  • optname - The name of the socket option.
  • p_optval - The value to be stored for this option.
  • optlen - The size of p_optval.

Returns 0 on success, or -1 on error.