pub fn accept_std(&mut self) -> io::Result<(net::TcpStream, SocketAddr)> {
        if let Async::NotReady = self.io.poll_read() {
            return Err(io::ErrorKind::WouldBlock.into())
        }

        match self.io.get_ref().accept_std() {
            Ok(pair) => Ok(pair),
            Err(e) => {
                if e.kind() == io::ErrorKind::WouldBlock {
                    self.io.need_read()?;
                }
                Err(e)
            }
        }
    }
/// Attempt to accept a connection and create a new connected `TcpStream` if
/// successful.
///
/// This function is the asme as `accept` above except that it returns a
/// `std::net::TcpStream` instead of a `tokio::net::TcpStream`. This in turn
/// can then allow for the TCP stream to be assoiated with a different
/// reactor than the one this `TcpListener` is associated with.
///
/// # Panics
///
/// This function will panic for the same reasons as `accept`, notably if
/// called outside the context of a future.
Attempt to accept a connection and create a new connected `TcpStream` if
successful.


Attempt to accept a connection and create a new connected ` TcpStream ` if successful .
pub fn accept_std(&mut self) -> io::Result<(net::TcpStream, SocketAddr)> {
        if let Async::NotReady = self.io.poll_read() {
            return Err(io::ErrorKind::WouldBlock.into())
        }
        match self.io.get_ref().accept_std() {
            Ok(pair) => Ok(pair),
            Err(e) => {
                if e.kind() == io::ErrorKind::WouldBlock {
                    self.io.need_read()?;
                }
                Err(e)
            }
        }
    }
pub fn accept_std ( & mut self ) -> io :: Result < ( net :: TcpStream , SocketAddr ) > { if let Async :: NotReady = self . io . poll_read ( ) { return Err ( io :: ErrorKind :: WouldBlock . into ( ) ) } match self . io . get_ref ( ) . accept_std ( ) { Ok ( pair ) => Ok ( pair ) , Err ( e ) => { if e . kind ( ) == io :: ErrorKind :: WouldBlock { self . io . need_read ( ) ? ; } Err ( e ) } } }
Attempt to accept a connection and create a new connected `TcpStream` if
successful.
Attempt to accept a connection and create a new connected ` TcpStream ` if successful .
&mut self
&mut self
panics
This function will panic for the same reasons as `accept`, notably if
called outside the context of a future.
This function will panic for the same reasons as ` accept ` notably if called outside the context of a future .