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

pub trait Listener<T, A: Acceptor<T>>: PhantomFn<T, T> {
    fn listen(self) -> IoResult<A>;
}

A listener is a value that can consume itself to start listening for connections.

Doing so produces some sort of Acceptor.

Required Methods

fn listen(self) -> IoResult<A>

Spin up the listener and start queuing incoming connections

Error

Returns Err if this listener could not be bound to listen for connections. In all cases, this listener is consumed.

Implementors