Skip to main content

socketSetFlags

Function socketSetFlags 

Source
pub unsafe extern "C" fn socketSetFlags(
    fd: i32,
    mask: u32,
    value: u32,
) -> i32
Expand description

Change flags on a socket. The mask determines which flags are set.

If this function is called within a subjectiveCheckout, it will only take effect if the top-level commit succeeds. If another context changes the flags, subjectiveCommit may fail.

Returns 0 on success or an error code on failure.

Errors:

  • EBADF: fd is not a valid file descriptor
  • ENOTSUP: The socket does not support the requested flags
  • ENOTSOCK: fd is not a socket
  • EACCES: The socket is owned by another context