summaryrefslogtreecommitdiff
path: root/src/session.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-15 09:48:58 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-03-20 23:45:01 +0800
commit28ad3d86ecd2ed6212ec4febd0bb90bd55c152c3 (patch)
tree3bd8cf8509ef9742b5ce3938fea702de5365ee7d /src/session.hpp
parent649965ec50eb2028c08a8cb6bfa77a62891f1797 (diff)
debug: only run hooks that is for debug purposes in debug builds
log: only log TRACE in debug builds
Diffstat (limited to 'src/session.hpp')
-rw-r--r--src/session.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/session.hpp b/src/session.hpp
index ddbfff9..a00168f 100644
--- a/src/session.hpp
+++ b/src/session.hpp
@@ -22,7 +22,7 @@ class CSession {
};
const std::string &getName() const;
- void setSelf(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);
@@ -55,11 +55,15 @@ class CSession {
void recvLoop();
bool registerSession();
+#ifdef DEBUG
void onConnect();
void onDisconnect();
+#endif
void onErrno(eEventType);
+#ifdef DEBUG
void onRecv(const SRecvData &data);
void onSend(const std::string &msg);
+#endif
void onShutdown();
friend class CSessionManager;