Since ReadySink isn't public yet, expose Connection::is_ready(). (#7)

Also use http from master
This commit is contained in:
Oliver Gould
2017-07-26 14:15:47 -07:00
committed by Carl Lerche
parent a203365d79
commit bd3a07f9e7
2 changed files with 5 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ futures = "0.1"
tokio-io = "0.1" tokio-io = "0.1"
tokio-timer = "0.1" tokio-timer = "0.1"
bytes = "0.4" bytes = "0.4"
http = { git = "https://github.com/carllerche/http", branch = "uri-parts" } http = { git = "https://github.com/carllerche/http" }
byteorder = "1.0" byteorder = "1.0"
log = "0.3.8" log = "0.3.8"
fnv = "1.0.5" fnv = "1.0.5"

View File

@@ -71,6 +71,10 @@ impl<T, P, B> Connection<T, P, B>
self.inner.take_pong() self.inner.take_pong()
} }
pub fn poll_ready(&mut self) -> Poll<(), ConnectionError> {
self.inner.poll_ready()
}
pub fn send_data(self, pub fn send_data(self,
id: StreamId, id: StreamId,
data: B, data: B,
@@ -246,14 +250,3 @@ impl<T, P, B> Sink for Connection<T, P, B>
self.inner.poll_complete() self.inner.poll_complete()
} }
} }
impl<T, P, B> ReadySink for Connection<T, P, B>
where T: AsyncRead + AsyncWrite,
P: Peer,
B: IntoBuf,
{
fn poll_ready(&mut self) -> Poll<(), Self::SinkError> {
trace!("poll_ready");
self.inner.poll_ready()
}
}