summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-06-18 09:07:50 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-06-18 09:07:50 +0800
commit0804c1285fe16977bce9f69c426a59994bebf594 (patch)
tree26496e5d138c77d819d29a1d22b1bac46cea4bc1 /include
parentb46ba43e06aba714abc0afb29566a56d69891691 (diff)
feat: shutdownClients accepts an optional cb func now
fix: disallow creation of multiple clientManager
Diffstat (limited to 'include')
-rw-r--r--include/libsock/server/client.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libsock/server/client.hpp b/include/libsock/server/client.hpp
index 6a5aa88..3b0d38d 100644
--- a/include/libsock/server/client.hpp
+++ b/include/libsock/server/client.hpp
@@ -89,7 +89,7 @@ class Clients {
void addClient(const Client &client);
bool nameExists(const std::string &name);
- void shutdownClients();
+ void shutdownClients(std::optional<std::function<std::any(const std::vector<std::pair<std::jthread, SP<Client>>> &)>> cb = std::nullopt);
SP<Client> getByName(const std::string &name) const;
SP<Client> getByIp(const std::string &ip) const;