DataBuf.len = length;
DataBuf.buf = strBuff;
pIoContext->m_Overlapped.hEvent = WSACreateEvent();
result = WSASend(socket, &DataBuf,1, &SendBytes, 0, &pIoContext->m_Overlapped, NULL);
DWORD a = GetLastError();
result = WSAWaitForMultipleEvents(1, &pIoContext->m_Overlapped.hEvent, TRUE, INFINITE, TRUE);
if (result == WSA_WAIT_FAILED) {
a = GetLastError();
fprintf(stderr, "WSAWaitForMultipleEvents failed: %d\n", WSAGetLastError());
//break;
}
result = WSAGetOverlappedResult(pIoContext->m_sockAccept, &pIoContext->m_Overlapped, &SendBytes, FALSE, &Flags);
if (result == FALSE) {
a = GetLastError();
fprintf(stderr, "WSASend operation failed: %d\n", WSAGetLastError());
//break;
}
//printf("Wrote %d bytes\n", SendBytes);
WSAResetEvent(pIoContext->m_Overlapped.hEvent);
WSASend一直在被触发,停不下来,不知道为什么