pub enum Socket {
Unix(Arc<AtomicRefCell<UnixSocket>>),
Inet(InetSocket),
Netlink(Arc<AtomicRefCell<NetlinkSocket>>),
}
Variants§
Implementations§
source§impl Socket
impl Socket
pub fn borrow(&self) -> SocketRef<'_>
pub fn try_borrow(&self) -> Result<SocketRef<'_>, BorrowError>
pub fn borrow_mut(&self) -> SocketRefMut<'_>
pub fn try_borrow_mut(&self) -> Result<SocketRefMut<'_>, BorrowMutError>
pub fn canonical_handle(&self) -> usize
pub fn bind( &self, addr: Option<&SockaddrStorage>, net_ns: &NetworkNamespace, rng: impl Rng ) -> SyscallResult
pub fn listen( &self, backlog: i32, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue ) -> Result<(), SyscallError>
pub fn connect( &self, addr: &SockaddrStorage, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue ) -> Result<(), SyscallError>
pub fn sendmsg( &self, args: SendmsgArgs<'_>, memory_manager: &mut MemoryManager, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue ) -> Result<ssize_t, SyscallError>
pub fn recvmsg( &self, args: RecvmsgArgs<'_>, memory_manager: &mut MemoryManager, cb_queue: &mut CallbackQueue ) -> Result<RecvmsgReturn, SyscallError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socket
impl !RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl !UnwindSafe for Socket
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more