Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,16 @@ where
pub fn is_extended_connect_protocol_enabled(&self) -> bool {
self.inner.is_extended_connect_protocol_enabled()
}

/// Returns the current max send streams
pub fn current_max_send_streams(&self) -> usize {
self.inner.current_max_send_streams()
}

/// Returns the current max recv streams
pub fn current_max_recv_streams(&self) -> usize {
self.inner.current_max_recv_streams()
}
}

impl<B> fmt::Debug for SendRequest<B>
Expand Down
10 changes: 10 additions & 0 deletions src/proto/streams/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ where
.send
.is_extended_connect_protocol_enabled()
}

pub fn current_max_send_streams(&self) -> usize {
let me = self.inner.lock().unwrap();
me.counts.max_send_streams()
}

pub fn current_max_recv_streams(&self) -> usize {
let me = self.inner.lock().unwrap();
me.counts.max_recv_streams()
}
}

impl<B> DynStreams<'_, B> {
Expand Down