From 89a41052c9195c684e1eb035b4a556f986c321f3 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 22 Jun 2025 17:59:08 +0800 Subject: API!(server/clients:newClient): now returns a future --- include/libsock/server/clients.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libsock/server/clients.hpp b/include/libsock/server/clients.hpp index 4b67c23..2591cc3 100644 --- a/include/libsock/server/clients.hpp +++ b/include/libsock/server/clients.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace LibSock { @@ -24,7 +25,7 @@ class Clients : public std::enable_shared_from_this { static SP create(WP server); ~Clients(); - SP newClient(std::function &)> cb = [](SP) {}, bool track = true, bool wait = false); + std::future> newClient(std::function &)> cb = [](SP) {}, bool track = true, bool wait = false); 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