diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-05-20 19:00:37 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-05-20 19:00:37 +0800 |
| commit | 9e3a7d5238d1b1c7a00e457f67a8108108909f01 (patch) | |
| tree | 713628aff287107182d1bd2a0f23f0327618b3c1 /src/session.hpp | |
| parent | 092965b583bd0c377ed5d9f2af0e0f4bb0548354 (diff) | |
Revert "internal: use smart pointer for everything, no more naked pointer"
This reverts commit 72cf95bc9b1eb338457a0815eb1fe4f70b42ebb3.
segfault/IOT instruct on client exit...
Diffstat (limited to 'src/session.hpp')
| -rw-r--r-- | src/session.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/session.hpp b/src/session.hpp index c3aecc1..1669964 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -24,7 +24,7 @@ class CSession { const std::string &getName() const; const std::string &getIp() const; - void setSelf(std::unique_ptr<std::pair<std::jthread, std::shared_ptr<CSession>>> self); + void setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self); std::unique_ptr<SRecvData> read(); std::unique_ptr<SRecvData> read(const std::string &msg, bool bypassDeaf = false); @@ -52,14 +52,14 @@ class CSession { WRITE }; - std::unique_ptr<std::pair<std::jthread, std::shared_ptr<CSession>>> self; - Hyprutils::OS::CFileDescriptor m_sockfd; - sockaddr_in m_addr; - socklen_t m_addrLen = sizeof(m_addr); - std::string m_name; - std::string m_ip; - int m_port; - bool m_isAdmin = false; + std::pair<std::jthread, std::shared_ptr<CSession>> *self; + Hyprutils::OS::CFileDescriptor m_sockfd; + sockaddr_in m_addr; + socklen_t m_addrLen = sizeof(m_addr); + std::string m_name; + std::string m_ip; + int m_port; + bool m_isAdmin = false; bool m_isReading = false; bool m_bMuted = false; |
