summaryrefslogtreecommitdiffstats
path: root/third_party/rust/neqo-transport/src/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/neqo-transport/src/server.rs')
-rw-r--r--third_party/rust/neqo-transport/src/server.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/rust/neqo-transport/src/server.rs b/third_party/rust/neqo-transport/src/server.rs
index 96a6244ef1..60909d71e1 100644
--- a/third_party/rust/neqo-transport/src/server.rs
+++ b/third_party/rust/neqo-transport/src/server.rs
@@ -689,6 +689,13 @@ impl Server {
mem::take(&mut self.active).into_iter().collect()
}
+ /// Whether any connections have received new events as a result of calling
+ /// `process()`.
+ #[must_use]
+ pub fn has_active_connections(&self) -> bool {
+ !self.active.is_empty()
+ }
+
pub fn add_to_waiting(&mut self, c: &ActiveConnectionRef) {
self.waiting.push_back(c.connection());
}