pub struct SockCreateKind(/* private fields */);Expand description
Flags given to crate::syscalls::SyscallTable::SysSockCreate,
Also contains information about the Socket Type, by default the Socket Type is SOCK_STREAM and blocking unless a flag was given
Implementations§
Source§impl SockCreateKind
impl SockCreateKind
Sourcepub const SOCK_STREAM: Self
pub const SOCK_STREAM: Self
A stream socket, only allowed for local domain sockets.
Sourcepub const SOCK_SEQPACKET: Self
pub const SOCK_SEQPACKET: Self
A SeqPacket Socket, unlike Stream Sockets which are the default for local sockets, this preserves messages boundaries
Sourcepub const SOCK_DGRAM: Self
pub const SOCK_DGRAM: Self
A Datagram Socket, only allowed for network domain sockets, UDP by default and preserves messages boundaries.
Sourcepub const SOCK_NON_BLOCKING: Self
pub const SOCK_NON_BLOCKING: Self
A Non Blocking Socket, anything that would normally block would return crate::errors::ErrorStatus::WouldBlock instead of blocking
except for crate::syscalls::SyscallTable::SysSockConnect,
this one is defined by POSIX as not blockable but it is way too hard to implement ._.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
returns true If self contains the flags other containsa
pub const fn from_bits_retaining(bits: u16) -> Self
Trait Implementations§
Source§impl BitOr for SockCreateKind
impl BitOr for SockCreateKind
Source§impl Clone for SockCreateKind
impl Clone for SockCreateKind
Source§fn clone(&self) -> SockCreateKind
fn clone(&self) -> SockCreateKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SockCreateKind
impl Debug for SockCreateKind
Source§impl PartialEq for SockCreateKind
impl PartialEq for SockCreateKind
Source§fn eq(&self, other: &SockCreateKind) -> bool
fn eq(&self, other: &SockCreateKind) -> bool
self and other values to be equal, and is used by ==.