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§
Sourcefn negotiated_version(&self) -> Option<Version>
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.
Sourcefn remote_addr(&self) -> Option<SocketAddr>
fn remote_addr(&self) -> Option<SocketAddr>
Returns the remote address that this connection is connected to.