socket9 0.1.0-alpha.1

Extended untilities for the networking/unix sockets and raw network sockets
Documentation

use bitflags::bitflags;


bitflags! {
    /// A flags which are received with [libc::recvmsg]
    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
    pub struct So9MsgFlags: i32 
    {
        /// W flag, Requests out-of-band data on sockets if supported.
        const MSG_OOB = libc::MSG_OOB;

        /// W flag, Switches the mode to peek instead of recv leaving the data
        /// as unread.
        const MSG_PEEK = libc::MSG_PEEK;

        /// W flag, A per-call option which acts like O_NONBLOCK but should be
        /// set every time.
        const MSG_DONTWAIT = libc::MSG_DONTWAIT;

        /// R flag, the constrol data was discarded
        const MSG_CTRUNC = libc::MSG_CTRUNC;
        
        /// R flag,  A message was truncated due to small buffer size.
        const MSG_TRUNC = libc::MSG_TRUNC;
        
        /// W flag. A message termination (if supported) for SEQPKT.
        const MSG_EOR = libc::MSG_EOR;

        /// R flag, socket error queue should be read.
        const MSG_ERRQUEUE = libc::MSG_ERRQUEUE;

        /// W flag. A `close-on-exec` which will be set for the file descriptor
        /// received through `msgsend` with `SCM_RIGHTS`
        #[cfg(any(
            target_os = "dragonfly",
            target_os = "freebsd",
            target_os = "linux",
            target_os = "netbsd",
            target_os = "openbsd",
            target_os = "android",))
        ]
        const MSG_CMSG_CLOEXEC = libc::MSG_CMSG_CLOEXEC;

        const MSG_NOSIGNAL = libc::MSG_NOSIGNAL;
    }


}