With winsock, and when you recieve the FD_READ state. Do you have to loop through all your sockets for the server, to determine what socket actually sent the server something. Or am I doing this backwards??
Kevin Ennis
Are you getting the FD_READ from a select, a WSAAsyncSelect, or a WSAEventSelect? The select should set the flags for the FD_SET object passed as the read paramter. The WSAAsyncSelect should send the socket as the WPARAM of the windows message. I can''t remember how the WSAEventSelect signals which socket was passed off the top of my head.
Thanks, not sure why I didn''t think of the wparam being the socket. I guess I assumed *cough* that since I used the wparam to get what the event was, it didn''t hold the socket. But now that saves wonders.
Kevin Ennis
Kevin Ennis
The low word of the LPARAM is the socket event; WPARAM should only hold the socket identifier.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement