Link to home
Start Free TrialLog in
Avatar of vinniew
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
ASKER CERTIFIED SOLUTION
Avatar of faster
faster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vinniew
vinniew

ASKER

Thanks.