Class CAsyncSocket::
InternalWSAAsyncSelect()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: InitializeNext page: IsBlocking    Show member index
Protected Function Declared in:
AsyncSocket.h

'Declaration' icon -- Shortcut to top of page. Declaration

int InternalWSAAsyncSelect(
    unsigned int wMsg,
    long lEvent);

'Description' icon -- Shortcut to top of page. Description

Save the last blocking status

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Cache the values
    m_iMsg=wMsg;
    m_lEvent=lEvent;

    //Message pairs
    typedef struct _MsgPair
    {
        unsigned int    uiMsg;
        AsyncEvents     aEvents;
    } MsgPair;

    //Our max events
    static const int iMaxEvents=4;

    //Our events data
    static const MsgPair aMsgPair[iMaxEvents]={{FD_READ,aeReceive},
                                               {FD_WRITE,aeSend},
                                               {FD_OOB,aeOOB},
                                               {FD_CLOSE,aeClose}};

    //Check if the messages are allowed
    for (int iCounter=0;iCounter<iMaxEvents;++iCounter)
        if ((m_lEvent & aMsgPair[iCounter].uiMsg) &&
            (m_ucEvents & ((unsigned char)aMsgPair[iCounter].aEvents)))
            //Remove it
            m_lEvent^=aMsgPair[iCounter].uiMsg;

    if (m_bBlocking)
        return 0;
    else
        //And call the async select
        return WSAAsyncSelect(GetAsyncHandle(),
                              GetWindowHandle(),
                              wMsg,
                              lEvent);
}
ERROR_HANDLER_RETURN("InternalWSAAsyncSelect",GetErrorCode())

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Protected base class CSpoofBase  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.