.dll .so 복사 자동화 완료

This commit is contained in:
2025-04-28 11:25:53 +09:00
parent f76e1b9a5d
commit 41c75b9dca
15 changed files with 165 additions and 69 deletions

View File

@@ -4,6 +4,7 @@
#include "Utils/ConfigManager.hpp"
#include "Utils/Thread.hpp"
#include "Utils/StringTokenizer.hpp"
#include "Session/Session.hpp"
#include "precomp.hpp"
@@ -31,16 +32,33 @@ int main() {
sock.bind(&serveraddr.addr, serveraddr.length);
sock.listen(SOMAXCONN);
#ifdef _WIN32
DWORD pid = GetCurrentProcessPid();
#elif __linux__
pid_t pid = getpid();
#endif
spdlog::info("PID : {}", pid);
while (true) {
spdlog::info("Waiting for connection...");
sock.accept(clientSock, clientAddr);
Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
thread_.deatch();
thread_.detach();
}
}
void _TCPClient(Chattr::TCPSocket sock, Chattr::Address addr) {
spdlog::info("Connection accepted! from: {}, {}", sock, (std::string)addr);
Sleep(10000);
spdlog::info("Connection accepted. [{}:{}]", sock, (std::string)addr);
char buf[1024];
while (true) {
int redSize = sock.recv(buf, 1024, 0);
if (redSize == 0)
break;
std::string recvData(buf, redSize);
spdlog::info("Red size : {}, {}", redSize, recvData);
}
spdlog::info("Client disconnected. [{}:{}]", sock, (std::string)addr);
}