Archived

This topic is now archived and is closed to further replies.

Valderman

Problem with asynchronous sockets

Recommended Posts

Here''s a really odd problem: My client program using asynchronous sockets, which worked perfectly just recently, stopped working when I added OpenGL support to the window. I removed the OpenGL stuff and thought ''I''ll make the network code work properly, and THEN add OpenGL'', but the asynchronous sockets still didn''t work. No messages are sent to the window specified with WSAASyncSelect. Even though I get connected and can send data to the server, which receives it and sends data back, I get no notification that the socket connected or received data. I use a SetupSocket function, which takes one pointer to a socket, one window handle, the port to bind and a bool determining if the socket should use SO_REUSEADDR or not. The function creates the socket, binds it to the port, sets it to use/not use SO_REUSEADDR and call the WSAASyncSelect() function with the correct socket and window handle, a message to send to the window, and FD_READ | FD_CONNECT | FD_CLOSE. Does anyone have any idea of what might be the reason for the messages not arriving to the window?


Three shall be the number thou shall count, and the number of the counting shall be three...

Share this post


Link to post
Share on other sites