13,871
社区成员




SLock.Lock();
pBuffSock->OLExt.pBuffSock = pBuffSock;
pBuffSock->OLExt.IOType = STATUS_BEFORE_ACCEPT;
// This SetAcceptMode is called in outer logic. so it dosen't call time consuming function like AcceptEx.
if (0 == PostQueuedCompletionStatus(m_hCompletionPort, 0, 0, (LPOVERLAPPED)&pBuffSock->OLExt))
{
m_pEL->ErrLog(ERRLOC, "PostQueuedCompletionStatus is failed. Error code = %d", GetLastError());
bError = 1;
goto ErrHand;
}
SLock.Unlock();
ErrHand:
if (1 == bError)
{
return RET_FAIL;
}