pub fn shutdown(&self, how: SocketShutdownFlags) -> Result<(), Errno> {
        let peer = {
            let mut inner = self.lock();
            let peer = inner.peer().ok_or_else(|| errno!(ENOTCONN))?.clone();
            if how.contains(SocketShutdownFlags::READ) {
                inner.shutdown_read();
            }
            peer
        };
        if how.contains(SocketShutdownFlags::WRITE) {
            let mut peer_inner = peer.lock();
            peer_inner.shutdown_write();
        }
        Ok(())
    }
/// Shuts down this socket according to how, preventing any future reads and/or writes.
///
/// Used by the shutdown syscalls.
Shuts down this socket according to how, preventing any future reads and/or writes.
Used by the shutdown syscalls.
Shuts down this socket according to how preventing any future reads and / or writes . Used by the shutdown syscalls .
pub fn shutdown(&self, how: SocketShutdownFlags) -> Result<(), Errno> {
        let peer = {
            let mut inner = self.lock();
            let peer = inner.peer().ok_or_else(|| errno!(ENOTCONN))?.clone();
            if how.contains(SocketShutdownFlags::READ) {
                inner.shutdown_read();
            }
            peer
        };
        if how.contains(SocketShutdownFlags::WRITE) {
            let mut peer_inner = peer.lock();
            peer_inner.shutdown_write();
        }
        Ok(())
    }
pub fn shutdown ( & self , how : SocketShutdownFlags ) -> Result < ( ) , Errno > { let peer = { let mut inner = self . lock ( ) ; let peer = inner . peer ( ) . ok_or_else ( | | errno ! ( ENOTCONN ) ) ? . clone ( ) ; if how . contains ( SocketShutdownFlags :: READ ) { inner . shutdown_read ( ) ; } peer } ; if how . contains ( SocketShutdownFlags :: WRITE ) { let mut peer_inner = peer . lock ( ) ; peer_inner . shutdown_write ( ) ; } Ok ( ( ) ) }
Shuts down this socket according to how, preventing any future reads and/or writes.
Shuts down this socket according to how preventing any future reads and / or writes .
&self
how
SocketShutdownFlags
&self
how
SocketShutdownFlags