add Connection::max_concurrent_send_streams (#513)
This PR adds accessors to `client::Connection` and `server::Connection` that return the send stream concurrency limit on that connection, as negotiated by the remote peer. This is part of issue #512. I think we probably ought to expose similar accessors for other settings, but I thought it was better to add each one in a separate, focused PR. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
@@ -1228,6 +1228,19 @@ where
|
||||
pub fn ping_pong(&mut self) -> Option<PingPong> {
|
||||
self.inner.take_user_pings().map(PingPong::new)
|
||||
}
|
||||
|
||||
/// Returns the maximum number of concurrent streams that may be initiated
|
||||
/// by this client.
|
||||
///
|
||||
/// This limit is configured by the server peer by sending the
|
||||
/// [`SETTINGS_MAX_CONCURRENT_STREAMS` parameter][settings] in a `SETTINGS`
|
||||
/// frame. This method returns the currently acknowledged value recieved
|
||||
/// from the remote.
|
||||
///
|
||||
/// [settings]: https://tools.ietf.org/html/rfc7540#section-5.1.2
|
||||
pub fn max_concurrent_send_streams(&self) -> usize {
|
||||
self.inner.max_send_streams()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, B> Future for Connection<T, B>
|
||||
|
||||
Reference in New Issue
Block a user