summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-06-21 21:05:58 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-06-22 11:13:20 +0800
commit3e11125a1694d61fb0bd578783437acfca8eacc3 (patch)
tree85696acd65b6910db6b15edf20040cf0c0c426c8 /include
parentcb63d849df275eb16ab8d9bea8414f342ba22c2f (diff)
API(server/clients:newClient): actually use the cb func user provided for client thread
Diffstat (limited to 'include')
-rw-r--r--include/libsock/server/clients.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libsock/server/clients.hpp b/include/libsock/server/clients.hpp
index a80fb4a..9e08797 100644
--- a/include/libsock/server/clients.hpp
+++ b/include/libsock/server/clients.hpp
@@ -25,7 +25,7 @@ class Clients : public std::enable_shared_from_this<Clients> {
static SP<Clients> create();
~Clients();
- WP<Client> newClient(SP<Server> server = pServer, std::optional<std::function<std::any(WP<Client>)>> cb = std::nullopt);
+ WP<Client> newClient(std::function<std::any(const WP<Client> &)> loopFunc = [](const WP<Client> &) { return std::any(); }, SP<Server> server = pServer);
void broadcast(const std::string &msg, std::optional<WP<Client>> self = std::nullopt); // second param only specified when we
// want to exclude the sender