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
5 changes: 5 additions & 0 deletions src/proto/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ where
}
}

/// Checks if there are any streams
pub fn has_streams(&self) -> bool {
self.inner.streams.has_streams()
}

/// Checks if there are any streams or references left
pub fn has_streams_or_other_references(&self) -> bool {
// If we poll() and realize that there are no streams or references
Expand Down
5 changes: 5 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ where
self.connection.take_user_pings().map(PingPong::new)
}

/// Checks if there are any streams
pub fn has_streams(&self) -> bool {
self.connection.has_streams()
}

/// Returns the maximum number of concurrent streams that may be initiated
/// by the server on this connection.
///
Expand Down