Hey guys, I'm kind of puzzled about this. I'm using WSAEventSelect() to notify on read, write, connect, OOB and accept. A client socket connects to a server socket (calls connect() using "localhost"); the werver socket receives notification of FD_ACCEPT, but doesn't call accept() yet; the client receives notification of FD_CONNECT.
What I don't get is that on MSDN it says that FD_CONNECT indicates completion of a connection, and the error bit tells you whether it failed or not. But if the server hasn't accepted the connection, how can the client have successfully completed the connection (Yes, I checked and the error bit is zero; and when I try connecting with no socket listening, it does give me an error)? Also, even before the FD_CONNECT event, I get an FD_WRITE event on the client socket, and when I try sending data, it doesn't return SOCKET_ERROR. In the mean time, after sending data, I don't get another FD_WRITE notification. And, to top it all off, I don't get any FD_READ notifications on the server socket. What's up with this whole deal?