Implement Client::poll_ready (#21)

Client::poll_ready ensures that the connection is ale to to initiate a new request stream to the remote server.  When the server is at capacity, a task is stored to be notified when capacity is available.
This commit is contained in:
Oliver Gould
2017-08-15 13:46:55 -07:00
committed by Carl Lerche
parent 150c3160be
commit e015d7bfba
4 changed files with 42 additions and 17 deletions

View File

@@ -76,7 +76,7 @@ impl<T, B> Client<T, B>
/// Returns `Ready` when the connection can initialize a new HTTP 2.0
/// stream.
pub fn poll_ready(&mut self) -> Poll<(), ConnectionError> {
unimplemented!();
self.connection.poll_send_request_ready()
}
/// Send a request on a new HTTP 2.0 stream