WaitFor function

Discussion in 'C++' started by Angus, Nov 11, 2006.

  1. Angus

    Angus New Member

    Joined:
    Nov 11, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello

    I am writing a program in C++ which calls asynchronous functions. The detail is that it is winsock programming and frequently a function is called which completes asynchronously. I get a requestid for each function. I then need to wait for the message with x requestid. So I want a WaitFor function - where I can pass in the requestid.

    So basically: bool WaitFor(int Requestid);

    When WaitFor returns I know that I have the data I need. I don't want a busy loop.

    How would I implement such a function for win32?

    Angus
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice