int ret;
ret = GetQueuedCompletionStatus(pthis->m_hIocp, &berByte, (LPDWORD)&re, (LPOVERLAPPED *)&pOverlap, INFINITE);if((!ret) || (ret && (0 == berByte))) //连接正常关闭
{
//客户端断开连接
OVERLAPPEDPLUS *olp = (OVERLAPPEDPLUS *)pOverlap;
closesocket(olp->s);
#ifdef _DEBUG
cout << "Connect Close :" << olp->name << endl;
#endif
continue;
}问题是,为什么有时当一个连接 关闭时,这里会反复出现几次?比如:一个名为Adsl29的连接 关闭了会出现
Connect Close :Adsl29
Connect Close :Adsl29
Connect Close :Adsl29
Connect Close :Adsl29甚至是
Connect Close :Adsl29
Connect Close :Adsl29
...
...
...
Connect Close :Adsl29
出现200多次??这是为什么啊?
ret = GetQueuedCompletionStatus(pthis->m_hIocp, &berByte, (LPDWORD)&re, (LPOVERLAPPED *)&pOverlap, INFINITE);if((!ret) || (ret && (0 == berByte))) //连接正常关闭
{
//客户端断开连接
OVERLAPPEDPLUS *olp = (OVERLAPPEDPLUS *)pOverlap;
closesocket(olp->s);
#ifdef _DEBUG
cout << "Connect Close :" << olp->name << endl;
#endif
continue;
}问题是,为什么有时当一个连接 关闭时,这里会反复出现几次?比如:一个名为Adsl29的连接 关闭了会出现
Connect Close :Adsl29
Connect Close :Adsl29
Connect Close :Adsl29
Connect Close :Adsl29甚至是
Connect Close :Adsl29
Connect Close :Adsl29
...
...
...
Connect Close :Adsl29
出现200多次??这是为什么啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货