Function wire::tcp::listen_tcp [] [src]

pub fn listen_tcp<A>(
    addr: A
) -> IoResult<(Receiver<(TcpStream, SocketAddr), IoError>, TcpListener)> where
    A: ToSocketAddrs

Starts listening for connections on this ip and port. Returns: * A receiver of Tcp stream objects. It is recommended that you upgrade these. * A TcpAcceptor. This can be used to close the listener from outside of the listening thread.