Solved

WSAAsyncSelect() calls using FD_ACCEPT

Posted on 1997-10-29
2
765 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
2 Comments
 
LVL 7

Accepted Solution

by:
faster earned 20 total points
Comment Utility
Your idea is correct, that is how we do in a recent project.
0
 
LVL 3

Author Comment

by:vinniew
Comment Utility
Thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now