feat(client): introduce lower-level Connection API

Closes #1449
This commit is contained in:
Sean McArthur
2018-03-07 12:59:55 -08:00
parent 0786ea1f87
commit 1207c2b624
19 changed files with 1814 additions and 792 deletions

View File

@@ -134,7 +134,6 @@ where
I,
<S::ResponseBody as Stream>::Item,
proto::ServerTransaction,
proto::KA,
>,
}
@@ -310,12 +309,10 @@ impl<B: AsRef<[u8]> + 'static> Http<B> {
I: AsyncRead + AsyncWrite,
{
let ka = if self.keep_alive {
proto::KA::Busy
} else {
proto::KA::Disabled
};
let mut conn = proto::Conn::new(io, ka);
let mut conn = proto::Conn::new(io);
if !self.keep_alive {
conn.disable_keep_alive();
}
conn.set_flush_pipeline(self.pipeline);
if let Some(max) = self.max_buf_size {
conn.set_max_buf_size(max);