From 77345ad0693698fa1857fc5eb7f09e06504c9432 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 18 Jun 2025 13:44:49 +0800 Subject: API: disallow creation of client without clientManager --- include/libsock/server/client.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/libsock/server/client.hpp') diff --git a/include/libsock/server/client.hpp b/include/libsock/server/client.hpp index 3ed4516..babcffe 100644 --- a/include/libsock/server/client.hpp +++ b/include/libsock/server/client.hpp @@ -36,7 +36,6 @@ inline SP pClients; class Client { public: - Client(SP server = SP(pServer), SP clients = pClients, bool track = false, bool oneShot = true); ~Client(); const std::string &getIp() const; @@ -53,6 +52,8 @@ class Client { bool isValid(); private: + Client(SP server = SP(pServer), SP clients = pClients, bool track = false, bool oneShot = true); + WP self; SP m_sockfd; sockaddr_in m_addr; -- cgit v1.2.3