summaryrefslogtreecommitdiff
path: root/include/libsock/server
diff options
context:
space:
mode:
Diffstat (limited to 'include/libsock/server')
-rw-r--r--include/libsock/server/clients.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libsock/server/clients.hpp b/include/libsock/server/clients.hpp
index 8eccbb7..a80fb4a 100644
--- a/include/libsock/server/clients.hpp
+++ b/include/libsock/server/clients.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "../types.hpp"
+#include "server.hpp"
#include <any>
#include <functional>
#include <memory>
@@ -24,7 +25,7 @@ class Clients : public std::enable_shared_from_this<Clients> {
static SP<Clients> create();
~Clients();
- WP<Client> newClient(std::optional<std::function<std::any(WP<Client>)>> cb = std::nullopt);
+ WP<Client> newClient(SP<Server> server = pServer, std::optional<std::function<std::any(WP<Client>)>> cb = std::nullopt);
void broadcast(const std::string &msg, std::optional<WP<Client>> self = std::nullopt); // second param only specified when we
// want to exclude the sender