Advertisement

Winsock WSAAsyncSelect Question

Started by October 28, 2005 01:17 PM
0 comments, last by Frequency 19 years, 3 months ago
Let's say that I have a several clients connected to a server, and therefore have several references to client connection sockets stored in the server. When an FB_READ message is received, how do I know which connection socket I should call recv() on? ...stip
The variable "wParam" that is passed whenever you get a WSAASYNC notice is your socket, so you could call, say,

recv(wParam, (char*)&data, sizeof(data));

And it will always be the socket you got data from. Pretty nifty.
It only takes one mistake to wake up dead the next morning.

This topic is closed to new replies.

Advertisement