diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-18 13:44:49 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-18 13:54:59 +0800 |
| commit | 77345ad0693698fa1857fc5eb7f09e06504c9432 (patch) | |
| tree | 99bd62ce5ed849f7fe36f007e3a14bf37aef21b6 /include/libsock | |
| parent | 2405f25c6b5e1c824599b8a4d76e6bda0b083849 (diff) | |
API: disallow creation of client without clientManager
Diffstat (limited to 'include/libsock')
| -rw-r--r-- | include/libsock/server/client.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<Clients> pClients; class Client { public: - Client(SP<Server> server = SP<Server>(pServer), SP<Clients> 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> server = SP<Server>(pServer), SP<Clients> clients = pClients, bool track = false, bool oneShot = true); + WP<Client> self; SP<LibSock::CFileDescriptor> m_sockfd; sockaddr_in m_addr; |
