windows 살짝 분리!
This commit is contained in:
@@ -59,7 +59,7 @@ int main() {
|
||||
bool enable = true;
|
||||
clientSock.setsockopt(SOL_SOCKET, SO_KEEPALIVE, (const char *)&enable, sizeof(enable));
|
||||
Chattr::IOCPPASSINDATA* ptr = new Chattr::IOCPPASSINDATA;
|
||||
ZeroMemory(&ptr->overlapped, sizeof(OVERLAPPED));
|
||||
::memset(&ptr->overlapped, 0, sizeof(OVERLAPPED));
|
||||
ptr->socket = std::move(clientSock);
|
||||
ptr->recvbytes = ptr->sendbytes = 0;
|
||||
ptr->wsabuf.buf = ptr->buf;
|
||||
@@ -67,7 +67,7 @@ int main() {
|
||||
|
||||
iocp.registerSocket(ptr->socket.sock);
|
||||
|
||||
int returnData = WSARecv(ptr->socket.sock, &ptr->wsabuf, 1, &recvbytes, &flags, &ptr->overlapped, NULL);
|
||||
int returnData = iocp.recv(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user