pub fn shutdown(&self, how: Shutdown) -> Result<()> {
        let how = match how {
            Shutdown::Write => SHUT_WR,
            Shutdown::Read => SHUT_RD,
            Shutdown::Both => SHUT_RDWR,
        };
        if unsafe { shutdown(self.socket, how) } < 0 {
            Err(Error::last_os_error())
        } else {
            Ok(())
        }
    }
/// Shutdown the read, write, or both halves of this connection.
Shutdown the read, write, or both halves of this connection.
Shutdown the read write or both halves of this connection .
pub fn shutdown(&self, how: Shutdown) -> Result<()> {
        let how = match how {
            Shutdown::Write => SHUT_WR,
            Shutdown::Read => SHUT_RD,
            Shutdown::Both => SHUT_RDWR,
        };
        if unsafe { shutdown(self.socket, how) } < 0 {
            Err(Error::last_os_error())
        } else {
            Ok(())
        }
    }
pub fn shutdown ( & self , how : Shutdown ) -> Result < ( ) > { let how = match how { Shutdown :: Write => SHUT_WR , Shutdown :: Read => SHUT_RD , Shutdown :: Both => SHUT_RDWR , } ; if unsafe { shutdown ( self . socket , how ) } < 0 { Err ( Error :: last_os_error ( ) ) } else { Ok ( ( ) ) } }
Shutdown the read, write, or both halves of this connection.
Shutdown the read write or both halves of this connection .
&self
how
Shutdown
&self
how
Shutdown