Trait static_web_server::transport::Transport

source ·
pub trait Transport: AsyncRead + AsyncWrite {
    // Required method
    fn remote_addr(&self) -> Option<SocketAddr>;
}
Expand description

Transport trait that supports the remote (peer) address.

Required Methods§

source

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

Returns the remote (peer) address of this connection.

Implementations on Foreign Types§

source§

impl Transport for AddrStream

Implementors§

source§

impl Transport for TlsStream

Available on crate feature http2 only.
source§

impl<T: AsyncRead + AsyncWrite + Unpin> Transport for LiftIo<T>