From 65672b471cdcd43daff8fcbbc6ff5d0d54159785 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 22 Jun 2025 17:21:46 +0800 Subject: API(server/client:newClient): optional cb function onConnect --- 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 dac5dd1..cb11e74 100644 --- a/include/libsock/server/clients.hpp +++ b/include/libsock/server/clients.hpp @@ -24,7 +24,7 @@ class Clients : public std::enable_shared_from_this { static SP create(WP server); ~Clients(); - SP newClient(); + SP newClient(std::function &)> cb = [](SP) {}); 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