I want to register my socket to FD_CLOSE event.
I use
WSAEVENT NewEvent = WSACreateEvent();
WSAEventSelect(_socket, NewEvent, FD_CLOSE)
my question is how do I handle the event when it will come? what function I need to add that I will know that the CLOSE happened?
thanks.
You can wait for the event using
WSAWaitForMultipleEventsand then determine which event occured usingWSAEnumNetworkEvents. This also resets the event to an un-signaled state.