Skip to main content
GameDev.net gamedev.net
🔒 Locked

Problem with asynchronous sockets

Started by klems Nov 6, 2002 at 2:10 PM 0 replies 600+ views
Original Post
klems
klems
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...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.