diff options
Diffstat (limited to 'src/session.hpp')
| -rw-r--r-- | src/session.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/session.hpp b/src/session.hpp index 4f5adb2..65aa7a0 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -13,16 +13,15 @@ class CSession { ~CSession(); struct SRecvData { - char data[1024] = {0}; - ssize_t dataSize = sizeof(data); - bool good = true; + std::string data; + bool good = true; }; std::string getName(); - void setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self); + void setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self); - SRecvData read(); - SRecvData read(const std::string &msg); + std::unique_ptr<SRecvData> read(); + std::unique_ptr<SRecvData> read(const std::string &msg); bool write(const std::string &msg); template <typename... Args> bool write(std::format_string<Args...> fmt, Args &&...args); |
