WSAEventSelect模型出现10053错误
if(NetworkEvents.lNetworkEvents & FD_CLOSE) // FD_CLOSE事件
{
if(NetworkEvents.iErrorCode[FD_CLOSE_BIT] != 0)
{
CString error;
error.Format(L"Close Error. Error code : %d\n",NetworkEvents.iErrorCode[FD_CLOSE_BIT]);
AfxMessageBox(error);
// return -1;
}
closesocket(sockAcceptArray[Index - WSA_WAIT_EVENT_0]); // 关闭socket
WSACloseEvent(EventArray[Index - WSA_WAIT_EVENT_0]); // 关闭事件
问题: 在客户端断开与服务器的连接后,服务器响应FD_CLOSE事件,执行以上代码时总是会有10053 WSAECONNABORTED 的错误. 关于该错误的说明,MSDN说是数据传输超时或协议错误? 但是我连接服务器,再马上断开,中间无数据传输,还是有该错误发生, 怎么回事?