Persistence of network events
On MSDN, under WSAEventSelect() it says:
However, it also says:
Issuing a WSAEventSelect for a socket cancels any previous WSAAsyncSelect
or WSAEventSelect for the same socket and clears the internal network event record
The first seems to imply that if you call WSAEventSelect() then any recorded events will be lost; the second seems to say that the notification will remain. Does this mean that all notifications will be cleared and then only the notifications requested in the call to WSAEventSelect() will be re-posted (in other words, no events are lost at all)?
If a network event has already happened when the application calls WSAEventSelect or when the reenabling function is called, then a network event is recorded and the associated event object is set as appropriate.
The reason I'm asking is because I'm calling accept() with an asynchronous socket, and the docs say that the returned socket will be initialized as an asynchronous socket with the same event object as the listening socket. It would be rather inconvenient if messages went missing due to the subsequent call to WSAEventSelect() associating the client socket with another event object.
Thanks in advance!