Original Post
I'm having difficulties in using asynchronous sockets. I'm using Windows XP and programming in C++. My goal is to have two programs, a server program and a client program, talk to each other using asynchronous sockets, over a LAN. I've gotten the program to work using blocking sockets, so I know the network is not an issue, but rather, the program. Also, when using the blocking-socket version of the server program and the asynchronous-socket version of the client program, everything seems to work. However, it doesn't work when I try to use the asynchronous-socket version of the server program, so that must be the problem. When debugging, after attempting to connect with the client program, I find that my server program never fires a WM_SOCKET (my custom message given to WSAASyncSelect() function) with the FD_ACCEPT parameter. So somehow the message is never received that the client wants to connect. Neither the bind() nor listen() functions ever return an error, so everythign looks like it should be fine. My source code is fairly messy (and embedded in a lot of stuff specific to my program, and not the problem), so if anyone has or knows of code for a Win32 Asynchronous client/server program(s), I'd appreciate being able to compare it to my code to see where the problem is. I've checked out the articles on gamedev and on google, but I can't seem to find the code for both server and clients with asynchronous sockets that I can test out and then compare. If not, I'll try and clean up the code so I can post it for help. Thanks. -Gauvir_Mucca