Archived

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

zackriggle

WSAAsyncSelect() on multiple sockets

Recommended Posts

Alright, I know that you cannot do WSAAsyncSelect more than once on a single socket -- the second time will overwrite the first time, the third will overwrite the second, etc. But, if I have two sockets, and 1 WinProc, can I call WSAAsyncSelect once for each socket, with a differet message for each socket, and get it to work? Ex. SOCKET s1, s2; WSAAsyncSelect(s1, msg1, ....); WSAAsyncSelect(s2, msg2, ....);

Share this post


Link to post
Share on other sites
Yes, you can use WSAAsyncSelect to manage multiple sockets. One an event, compare the data structure Windows returns via params to the sockets you have to determine the active socket.

Kuphryn

Share this post


Link to post
Share on other sites