Trait timeout_io::Acceptor [−][src]
A trait for accepting elements, e.g. a TCP-listener
Required Methods
fn accept(&self, timeout: Duration) -> Result<T>
Accepts a type-T
-connection
Warning: In most cases, self
will be switched into nonblocking mode. It's up to you to
restore the previous mode if necessary.
Parameters:
timeout
: The time to wait for a connection
Returns either the accepted connection or a corresponding IoError
Implementations on Foreign Types
impl Acceptor<TcpStream> for TcpListener
[src]
impl Acceptor<TcpStream> for TcpListener