refactor client disconnect, client interation

anywhere a client is disconnected, TNetwork::Disconnect is called now.
Nothing else is valid.
ForEachClientWeak() was fully removed.
This commit is contained in:
Lion Kortlepel
2024-01-11 14:09:50 +01:00
parent aa29d04b60
commit 130e1acdb3
10 changed files with 79 additions and 106 deletions
-1
View File
@@ -24,7 +24,6 @@ public:
void RemoveClient(const std::weak_ptr<TClient>&);
void RemoveClient(TClient&);
// in Fn, return true to continue, return false to break
[[deprecated("Use ForEachClient instead")]] void ForEachClientWeak(const std::function<bool(std::weak_ptr<TClient>)>& Fn);
void ForEachClient(const std::function<bool(const std::shared_ptr<TClient>&)> Fn);
size_t ClientCount() const;