diff options
Diffstat (limited to 'include/libsock/server/clients.hpp')
| -rw-r--r-- | include/libsock/server/clients.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/libsock/server/clients.hpp b/include/libsock/server/clients.hpp index 9e08797..d8c1921 100644 --- a/include/libsock/server/clients.hpp +++ b/include/libsock/server/clients.hpp @@ -2,7 +2,6 @@ #include "../types.hpp" #include "server.hpp" -#include <any> #include <functional> #include <memory> #include <optional> @@ -25,14 +24,14 @@ class Clients : public std::enable_shared_from_this<Clients> { static SP<Clients> create(); ~Clients(); - WP<Client> newClient(std::function<std::any(const WP<Client> &)> loopFunc = [](const WP<Client> &) { return std::any(); }, SP<Server> server = pServer); + WP<Client> newClient(std::function<void(const WP<Client> &)> loopFunc = [](const WP<Client> &) { ; }, 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 - void kick(WP<Client> client, const bool kill = false, const std::string &reason = "", std::optional<std::function<std::any(const std::vector<std::pair<std::jthread, SP<Client>>>::iterator &)>> cb = std::nullopt); + void kick(WP<Client> client, const bool kill = false, const std::string &reason = "", std::optional<std::function<bool(const std::vector<std::pair<std::jthread, SP<Client>>>::iterator &)>> cb = std::nullopt); void addClient(const Client &client); - void shutdownClients(std::optional<std::function<std::any(const std::vector<std::pair<std::jthread, SP<Client>>> &)>> cb = std::nullopt); + void shutdownClients(std::optional<std::function<bool(const std::vector<std::pair<std::jthread, SP<Client>>> &)>> cb = std::nullopt); SP<Client> getByIp(const std::string &ip) const; std::vector<SP<Client>> getClients() const; |
