From 3e11125a1694d61fb0bd578783437acfca8eacc3 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 21 Jun 2025 21:05:58 +0800 Subject: API(server/clients:newClient): actually use the cb func user provided for client thread --- include/libsock/server/clients.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libsock') 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 { static SP create(); ~Clients(); - WP newClient(SP server = pServer, std::optional)>> cb = std::nullopt); + WP newClient(std::function &)> loopFunc = [](const WP &) { return std::any(); }, SP server = pServer); void broadcast(const std::string &msg, std::optional> self = std::nullopt); // second param only specified when we // want to exclude the sender -- cgit v1.2.3