1OnReceive: Notifies this socket that there is data in the buffer for it to retrieve by calling Receive.CMySocket::OnReceive(int nErrorCode)
{
this->Receive();
}
2OnSend: Notifies this socket that it can now send data by calling Send.CMySocket::OnSend(int nErrorCode)
{
this->Send();
}3OnAccept: Notifies this listening socket that it can accept pending connection requests by calling Accept.CMySocket::OnAccept(int nErrorCode)
{
this->Accept();
}4OnConnect: Notifies this connecting socket that its connection attempt completed: perhaps successfully or perhaps in error.CMySocket:;Connect();CMySocket::OnConnect(int nErrorCode)
{
}
请问是不是这样的顺序调用啊?
{
this->Receive();
}
2OnSend: Notifies this socket that it can now send data by calling Send.CMySocket::OnSend(int nErrorCode)
{
this->Send();
}3OnAccept: Notifies this listening socket that it can accept pending connection requests by calling Accept.CMySocket::OnAccept(int nErrorCode)
{
this->Accept();
}4OnConnect: Notifies this connecting socket that its connection attempt completed: perhaps successfully or perhaps in error.CMySocket:;Connect();CMySocket::OnConnect(int nErrorCode)
{
}
请问是不是这样的顺序调用啊?
FD_WRITE
FD_OOB
FD_ACCEPT
FD_CONNECT
FD_CLOSE 是什么时候调用的呢?FD_ACCEPT
FD_CONNECT这两个还比较容易调试,其余的是在什么时间被调用呢?我有看msdn,网络编程技术
还是不是很清楚,很明确。大家给个相关的链接或者是提示就可以了,谢谢
第8章,Socket I/O Models中的WSAAsyncSelect模式。
仔细看看。再看看CAsyncSocket的实现中的CAsyncSocket::DoCallBack()函数。