diff options
Diffstat (limited to 'include/libsock/server/clients.hpp')
| -rw-r--r-- | include/libsock/server/clients.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <optional> #include <string> #include <thread> +#include <future> #include <vector> namespace LibSock { @@ -24,7 +25,7 @@ class Clients : public std::enable_shared_from_this<Clients> { static SP<Clients> create(WP<Server> server); ~Clients(); - SP<Client> newClient(std::function<void(SP<Client> &)> cb = [](SP<Client>) {}, bool track = true, bool wait = false); + std::future<SP<Client>> newClient(std::function<void(SP<Client> &)> cb = [](SP<Client>) {}, bool track = true, bool wait = false); void broadcast(const std::string &msg, std::optional<WP<Client>> self = std::nullopt); // second param only specified when we // want to exclude the sender |
