/// Attempt to accept a connection and create a new connected `TcpStream` if
/// successful.
///
/// This function will attempt an accept operation, but will not block
/// waiting for it to complete. If the operation would block then a "would
/// block" error is returned. Additionally, if this method would block, it
/// registers the current task to receive a notification when it would
/// otherwise not block.
///
/// Note that typically for simple usage it's easier to treat incoming
/// connections as a `Stream` of `TcpStream`s with the `incoming` method
/// below.
///
/// # Panics
///
/// This function will panic if it is called outside the context of a
/// future's task. It's recommended to only call this from the
/// implementation of a `Future::poll`, if necessary.
Attempt to accept a connection and create a new connected `TcpStream` if
successful.

This function will attempt an accept operation, but will not block
waiting for it to complete. If the operation would block then a "would
block" error is returned. Additionally, if this method would block, it
registers the current task to receive a notification when it would
otherwise not block.


Attempt to accept a connection and create a new connected ` TcpStream ` if successful . This function will attempt an accept operation but will not block waiting for it to complete . If the operation would block then a " would block " error is returned . Additionally if this method would block it registers the current task to receive a notification when it would otherwise not block .
pub fn accept(&mut self) -> io::Result<(TcpStream, SocketAddr)> {
        let (stream, addr) = self.accept_std()?;
        let stream = TcpStream::from_std(stream, self.io.handle())?;
        Ok((stream, addr))
    }
pub fn accept ( & mut self ) -> io :: Result < ( TcpStream , SocketAddr ) > { let ( stream , addr ) = self . accept_std ( ) ? ; let stream = TcpStream :: from_std ( stream , self . io . handle ( ) ) ? ; Ok ( ( stream , addr ) ) }
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
panics
This function will panic if it is called outside the context of a
future's task. It's recommended to only call this from the
implementation of a `Future::poll`, if necessary.
This function will panic if it is called outside the context of a future ' s task . It ' s recommended to only call this from the implementation of a ` Future :: poll ` if necessary .