Trait Connected

Source
pub trait Connected {
    // Provided method
    fn remote_addr(&self) -> Option<SocketAddr> { ... }
}
Expand description

Trait that connected IO resources implement.

The goal for this trait is to allow users to implement custom IO types that can still provide the same connection metadata.

Provided Methods§

Source

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

Return the remote address this IO resource is connected too.

Implementations on Foreign Types§

Source§

impl Connected for TcpStream

Implementors§