diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-18 11:21:15 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-18 11:21:15 +0800 |
| commit | f5aacb29f5f238ae9121bf43d96ad2eba361e7b7 (patch) | |
| tree | da6fbe7a95601c4ae802e521fac9e2dda9d7484a /include/libsock/server | |
| parent | 78468145f073bc8aa315206fbd9b46b92e37ea45 (diff) | |
API(server/clients): callback fucntion for kick function
Diffstat (limited to 'include/libsock/server')
| -rw-r--r-- | include/libsock/server/client.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libsock/server/client.hpp b/include/libsock/server/client.hpp index 3b0d38d..59870ce 100644 --- a/include/libsock/server/client.hpp +++ b/include/libsock/server/client.hpp @@ -85,7 +85,7 @@ class Clients { WP<Client> newClient(std::optional<std::function<std::any(WP<Client>)>> cb = std::nullopt); void broadcast(const std::string &msg, std::optional<WP<Client>> self = std::nullopt); // second param only specified when we want to exclude the sender - void kick(WP<Client> client, const bool kill = false, const std::string &reason = ""); + void kick(WP<Client> client, const bool kill = false, const std::string &reason = "", std::optional<std::function<std::any(const std::vector<std::pair<std::jthread, SP<Client>>>::iterator &)>> cb = std::nullopt); void addClient(const Client &client); bool nameExists(const std::string &name); |
