?
Solved

WSAAsyncSelect() calls using FD_ACCEPT

Posted on 1997-10-29
2
Medium Priority
?
780 Views
Last Modified: 2013-12-03
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
0
Comment
Question by:vinniew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
faster earned 40 total points
ID: 1408046
Your idea is correct, that is how we do in a recent project.
0
 
LVL 3

Author Comment

by:vinniew
ID: 1408047
Thanks.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question