Skip to content

Commit

Permalink
Add API for getting the current active connection count.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerstu committed Jul 13, 2024
1 parent bb31bbc commit 32c32fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ble/Connection.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Connection> connections_;
Expand Down

0 comments on commit 32c32fe

Please sign in to comment.