vinniew
asked on
WSAAsyncSelect() calls using FD_ACCEPT
Can some one tell me how you would use WSAAsyncSelect with FD_ACCEPT?
Would it look like this? :
WSAAsyncSelect(...);
listen(..);
WINAPI wndProc(WORD wMsg, WPARAM wParam, LPARAM lParam)
{
switch(wMsg) {
case FD_ACCEPT:
g_sMySocket = accept(g_sMyPreviousSocket ...);
}
???
or should the accept call be made outside of the switch statement after the WSAAsyncSelect() call?
I've never seen this used like this, which is why I'm asking.
Thanks.
V
Would it look like this? :
WSAAsyncSelect(...);
listen(..);
WINAPI wndProc(WORD wMsg, WPARAM wParam, LPARAM lParam)
{
switch(wMsg) {
case FD_ACCEPT:
g_sMySocket = accept(g_sMyPreviousSocket
}
???
or should the accept call be made outside of the switch statement after the WSAAsyncSelect() call?
I've never seen this used like this, which is why I'm asking.
Thanks.
V
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER