Class CSocketPool::
CheckQueue()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: m_pCSectionQueueNext page: Clear    Show member index
Private Function Declared in:
SocketPool.h

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

void CheckQueue();

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

Check if we have data in queue

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

try
{
    //Lock the CSection
    CCriticalAutoRelease aRelease(m_pCSection);

    //Do we have data
    if (m_aQueue.empty())
        //Decrease the count
        --m_iActiveSockets;
    else
    {
        //Take the socket
        CSocketPoolSocket* pSocket;
        pSocket=m_aQueue.front();

        //Protect the socket
        std::auto_ptr<CSocketPoolSocket> pProtection(pSocket);

        //Remove the front
        m_aQueue.pop_front();

        //Exit the CS
        aRelease.Exit();

        //Try to reconnect
        if (!pSocket->Connect())
            //Recheck the queue
            CheckQueue();
        else
            //Release the protection
            pProtection.release();
    }
}
ERROR_HANDLER("CheckQueue")

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

Class Overview Class Overview  |  Public base class CErrorHandler  |  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.