From 32c32fef7849b0492f9d316f1bc3bc85f315d353 Mon Sep 17 00:00:00 2001 From: Stuart Baker Date: Sat, 13 Jul 2024 14:41:21 -0500 Subject: [PATCH] Add API for getting the current active connection count. --- src/ble/Connection.hxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ble/Connection.hxx b/src/ble/Connection.hxx index 1890114fc..397fa7b8f 100644 --- a/src/ble/Connection.hxx +++ b/src/ble/Connection.hxx @@ -198,6 +198,13 @@ public: return nullptr; } + /// Get the number of active connections being tracked by this object. + /// @return number of active connections + size_t get_active_count() + { + return connections_.size(); + } + private: /// All the connections managed by the container. std::vector connections_;