summaryrefslogtreecommitdiff
path: root/src/session.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-04-04 11:53:03 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-04-07 16:32:07 +0800
commit4c904905f5f0667786d4c4b32d150b3d4328cfc2 (patch)
treea397604070be947ea051f0db3555c34e604686df /src/session.hpp
parent48c6f2384592c42a0fdbb6e420c77f6e10209f24 (diff)
session: use std::string for m_ip instead of c char
Diffstat (limited to 'src/session.hpp')
-rw-r--r--src/session.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/session.hpp b/src/session.hpp
index 8aee414..65bef68 100644
--- a/src/session.hpp
+++ b/src/session.hpp
@@ -23,7 +23,7 @@ class CSession {
};
const std::string &getName() const;
- const char *getIp() const;
+ const std::string &getIp() const;
void setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self);
std::unique_ptr<SRecvData> read();
@@ -57,7 +57,7 @@ class CSession {
sockaddr_in m_addr;
socklen_t m_addrLen = sizeof(m_addr);
std::string m_name;
- char m_ip[INET_ADDRSTRLEN];
+ std::string m_ip;
int m_port;
bool m_isAdmin = false;