Hi,
I've this piece of code on my Server, which tries to understand if a certian Client has sent data of has closed his socket.
the value of 'dReturn' always equals ZERO and my question is:Code:WSAEVENT hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); ret = WSAEventSelect(m_client, hEvent, FD_READ | FD_CLOSE); do { DWORD dReturn = WaitForSingleObject(hEvent, INFINITE); int r = recv(m_client, sData, 64, 0); printf("Status: %d\n", dReturn); } while(true);
How can I distinguish between: FD_READ to FD_CLOSE ??
Thanks




Reply With Quote