임시저장(빌드 안됨) 졸려서 자러갈거야

This commit is contained in:
2025-04-29 21:49:58 +09:00
parent 1c6404530d
commit 1703974310
8 changed files with 167 additions and 17 deletions

View File

@@ -3,6 +3,7 @@
#include "Socket/WSAManager.hpp"
#include "Utils/ConfigManager.hpp"
#include "Utils/Thread.hpp"
#include "Utils/ThreadPool.hpp"
#include "Utils/StringTokenizer.hpp"
#include "Session/Session.hpp"
@@ -39,12 +40,17 @@ int main() {
#endif
spdlog::info("PID : {}", pid);
Chattr::ThreadPool threadPool(3);
while (true) {
spdlog::info("Waiting for connection...");
sock.accept(clientSock, clientAddr);
Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
thread_.detach();
threadPool.enqueueJob(_TCPClient, std::move(clientSock), clientAddr);
//Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
//thread_.detach();
}
}