pub unsafe extern "C" fn ddsrt_setsockopt(
sock: ddsrt_socket_t,
level: i32,
optname: i32,
optval: *const c_void,
optlen: socklen_t,
) -> dds_return_tExpand description
@brief Set options on the socket
Most socket-level options utilize an int argument for ‘optval’. The argument should be nonzero to enable a boolean option, or zero if the option is to be disabled.
@param[in,out] sock the socket @param[in] level the level at which the option resides. For socket API use SOL_SOCKET @param[in] optname the name of the option (SO_REUSEADDR, SO_DONTROUTE, SO_BROADCAST, SO_SNDBUF, SO_RCVBUF, …) @param[in] optval buffer containing the option value @param[in] optlen size of buffer ‘optval’ @return a DDS_RETCODE (OK, ERROR, BAD_PARAMETER, UNSUPPORTED)
See @ref ddsrt_getsockopt