임시저장(빌드 안됨) 졸려서 자러갈거야
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user