Trait hyper::net::NetworkStreamExperimental [-]  [+] [src]

pub trait NetworkStream: Stream + Clone + Send {
    fn peer_name(&mut self) -> IoResult<SocketAddr>;
    fn connect(host: &str, Port, scheme: &str) -> IoResult<Self>;

    fn dynamic(self) -> Box<NetworkStream + Send> { ... }
}

An abstraction over streams that a Server can utilize.

Required Methods

fn peer_name(&mut self) -> IoResult<SocketAddr>

Get the remote address of the underlying connection.

fn connect(host: &str, Port, scheme: &str) -> IoResult<Self>

Connect to a remote address.

Provided Methods

fn dynamic(self) -> Box<NetworkStream + Send>

Turn this into an appropriately typed trait object.

Implementors