자잘한 수정

This commit is contained in:
2025-05-02 12:59:59 +09:00
parent 925d3874c8
commit 7fabc98456
5 changed files with 41 additions and 25 deletions

View File

@@ -51,8 +51,6 @@ int main() {
#endif
spdlog::debug("PID : {}", pid);
DWORD recvbytes = 0, flags = 0;
while (true) {
spdlog::info("Waiting for connection...");
sock.accept(clientSock, clientAddr);
@@ -64,6 +62,7 @@ int main() {
ptr->recvbytes = ptr->sendbytes = 0;
ptr->wsabuf.buf = ptr->buf;
ptr->wsabuf.len = 1500;
ptr->IOCPInstance = &iocp;
iocp.registerSocket(ptr->socket.sock);
@@ -166,9 +165,8 @@ void _IOCPClient(Chattr::ThreadPool* thread, Chattr::IOCPPASSINDATA* data) {
packetError = true;
break;
}
DWORD recvbytes = 0, flags = 0;
int returnData = WSARecv(data->socket.sock, &data->wsabuf, 1, &recvbytes, &flags, &data->overlapped, NULL);
int returnData = data->IOCPInstance->recv(data);
}
void _TCPSendClient(Chattr::ThreadPool* thread, Chattr::TCPSocket sock, std::queue<Chattr::ResponsePacket> packets) {