From 80b51b45089d2cf3aa5670454d1c971e4adff18c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 21 Jun 2025 20:27:35 +0800 Subject: API(server/clients): runLoop, resumeHistory --- include/libsock/server/client.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/libsock') diff --git a/include/libsock/server/client.hpp b/include/libsock/server/client.hpp index 0579a38..f7d9889 100644 --- a/include/libsock/server/client.hpp +++ b/include/libsock/server/client.hpp @@ -43,7 +43,8 @@ class Client { template bool write(std::format_string fmt, Args &&...args); - void run(); + void resumeHistory(); + void runLoop(bool resumeHistory = true, std::optional> cb = std::nullopt); bool isValid(); @@ -61,7 +62,7 @@ class Client { std::optional m_szReading = std::nullopt; - void recvLoop(); + void recvLoop(std::optional> cb = std::nullopt); friend class Clients; }; -- cgit v1.2.3