Trait timeout_io::Acceptor[][src]

pub trait Acceptor<T> {
    fn accept(&self, timeout: Duration) -> Result<T>;
}

A trait for accepting elements, e.g. a TCP-listener

Required Methods

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]

Implementors