整理的一个简单的完成端口类
std::set<LPPER_IO_CONTEXT>::iterator temp = pos;
++pos;
p->InsertIoMem(*temp);
p->m_pConnectList->erase(temp);
if(pos == p->m_pConnectList->end())
break;
else
{
LPPER_IO_CONTEXT temp1 = *pos;
pos = p->m_pConnectList->find(temp1);
continue;
}
}
++pos;
}
LeaveCriticalSection(&p->m_conSection);
}
else if(WAIT_O
BJECT_0==ret)
{
if(!p->PostAcceptEx()) //开启接受连接服务
{
return 0;
}
else
{
continue;
}
}
}
return 1;