MSDN的解释是这个,我也再仔细看看The WSACreateEvent function creates an event object that is manually reset with an initial state of nonsignaled. Windows Sockets 2 event objects are system objects in Windows environments. Therefore, if a Windows application desires auto reset events, it can call the native CreateEvent Windows function directly. The scope of an event object is limited to the process in which it is created.可能这个函数是个全局事件,而用CREATEEVENT就是一个局部事件(能自动释放)
我想假如是前一种,应该没区别吧.后一种有区别吧.
原理是,在生成Socket对象之后,MFC为之创建一个CSocketWnd的对象。同时MFC产成一个线程调用select函数轮询Socket,一旦发生某种事件(select的返回结果,具体参见该函数描述),则向CSocketWnd的对象发送消息,该对象根据消息的类型分别调用CSocket::OnReceive/CSocket::OnSend等函数。我不清楚你所说的内核事件是否是CEvent,如果是的话,那么是完全不一样的 。
windows事件等同对待。