pub enum InetSocket {
    LegacyTcp(Arc<AtomicRefCell<LegacyTcpSocket>>),
    Tcp(Arc<AtomicRefCell<TcpSocket>>),
    Udp(Arc<AtomicRefCell<UdpSocket>>),
}Variants§
LegacyTcp(Arc<AtomicRefCell<LegacyTcpSocket>>)
Tcp(Arc<AtomicRefCell<TcpSocket>>)
Udp(Arc<AtomicRefCell<UdpSocket>>)
Implementations§
Source§impl InetSocket
 
impl InetSocket
pub fn borrow(&self) -> InetSocketRef<'_>
pub fn try_borrow(&self) -> Result<InetSocketRef<'_>, BorrowError>
pub fn borrow_mut(&self) -> InetSocketRefMut<'_>
pub fn try_borrow_mut(&self) -> Result<InetSocketRefMut<'_>, BorrowMutError>
pub fn downgrade(&self) -> InetSocketWeak
Sourcepub fn canonical_handle(&self) -> usize
 
pub fn canonical_handle(&self) -> usize
Useful for getting a unique integer handle for a socket, or when we need to compare a C
LegacySocket to a rust InetSocket (which may internally point to the same
LegacySocket).
pub fn bind( &self, addr: Option<&SockaddrStorage>, net_ns: &NetworkNamespace, rng: impl Rng, ) -> Result<(), SyscallError>
pub fn listen( &self, backlog: i32, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue, ) -> Result<(), Errno>
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§
Source§impl Clone for InetSocket
 
impl Clone for InetSocket
Source§fn clone(&self) -> InetSocket
 
fn clone(&self) -> InetSocket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for InetSocket
 
impl Debug for InetSocket
Source§impl Hash for InetSocket
 
impl Hash for InetSocket
Source§impl PartialEq for InetSocket
 
impl PartialEq for InetSocket
impl Eq for InetSocket
Auto Trait Implementations§
impl Freeze for InetSocket
impl !RefUnwindSafe for InetSocket
impl Send for InetSocket
impl Sync for InetSocket
impl Unpin for InetSocket
impl !UnwindSafe for InetSocket
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more