둘 다 동시 디버깅을 위해 push

This commit is contained in:
2025-05-03 17:58:46 +09:00
parent 4bbb6837e8
commit 6ad787eed7
11 changed files with 305 additions and 97 deletions

View File

@@ -51,8 +51,6 @@ public:
void joinRoom(Snowflake UID, Snowflake RID);
void exitRoom(Snowflake UID, Snowflake RID);
Snowflake generateID();
void run();
private:
ThreadPool threadPool_;
@@ -64,14 +62,13 @@ private:
struct Address clientAddr_;
std::mutex resourceMutex_;
std::mutex snowflakeGenerateMutex_;
std::unordered_map<Snowflake, std::string> roomNames_;
std::unordered_map<Snowflake, std::unordered_map<Snowflake, std::shared_ptr<TCPSocket>>> rooms_;
std::unordered_map<Snowflake, std::shared_ptr<TCPSocket>> UID2userSocket_;
std::unordered_map<TCPSocket*, Snowflake> userSocket2UID_;
std::unordered_map<std::shared_ptr<TCPSocket>, Snowflake> userSocket2UID_;
std::unordered_map<Snowflake, std::string> userNames_;