Trait std::old_io::AcceptorUnstable [-] [+] [src]

pub trait Acceptor<T> {
    fn accept(&mut self) -> IoResult<T>;

    fn incoming<'r>(&'r mut self) -> IncomingConnections<'r, Self> { ... }
}

An acceptor is a value that presents incoming connections

Required Methods

fn accept(&mut self) -> IoResult<T>

Wait for and accept an incoming connection

Error

Returns Err if an I/O error is encountered.

Provided Methods

fn incoming<'r>(&'r mut self) -> IncomingConnections<'r, Self>

Create an iterator over incoming connection attempts.

Note that I/O errors will be yielded by the iterator itself.

Implementors