Struct hyper::http::h1::Http11Protocol
source · pub struct Http11Protocol { /* private fields */ }
Expand description
The Protocol
implementation provides HTTP/1.1 messages.
Implementations§
source§impl Http11Protocol
impl Http11Protocol
sourcepub fn with_connector<C, S>(c: C) -> Http11Protocolwhere
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream + Send,
pub fn with_connector<C, S>(c: C) -> Http11Protocolwhere
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream + Send,
Creates a new Http11Protocol
instance that will use the given NetworkConnector
for
establishing HTTP connections.
Trait Implementations§
source§impl Protocol for Http11Protocol
impl Protocol for Http11Protocol
source§fn new_message(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<Box<dyn HttpMessage>>
fn new_message(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<Box<dyn HttpMessage>>
Creates a fresh
HttpMessage
bound to the given host, based on the given protocol scheme.