Trait Connection

Source
pub trait Connection: AsyncRead + AsyncWrite {
    // Required method
    fn peer_addr(&self) -> Option<SocketAddr>;
}
Expand description

A stream between a local and remote target.

Required Methods§

Source

fn peer_addr(&self) -> Option<SocketAddr>

Returns the socket address of the remote peer of this connection.

Implementations on Foreign Types§

Source§

impl Connection for TcpStream

Implementors§