Trait HttpConnection

Source
pub trait HttpConnection {
    // Provided methods
    fn negotiated_version(&self) -> Option<Version> { ... }
    fn remote_addr(&self) -> Option<SocketAddr> { ... }
}
Expand description

Represents a HTTP aware connection.

This connection is a AsyncRead + AsyncWrite stream that provides information on what http versions were determinted ALPN negotiation or what the remote address this stream is connected too.

Provided Methods§

Source

fn negotiated_version(&self) -> Option<Version>

Returns the version that this stream is set too.

For version this indicates that this stream is accepting http frames of the version returned. If None is returned then there has been no prior negotiation for the http version.

Source

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

Returns the remote address that this connection is connected to.

Implementations on Foreign Types§

Source§

impl HttpConnection for TcpStream

Source§

impl HttpConnection for TcpStream

Implementors§