Class CWhoisSocket::
QueryDone()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: PopulateMapNext page: ReceiveWhois    Show member index
Private Function Declared in:
WhoisSocket.h

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

void QueryDone(
    BOOL bError,
    BOOL bReallocate);

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

Set the query is done

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

try
{
    //Set the data
    m_bError=bError;

    //Do we have an error
    if (bReallocate)
    {
        //Close the socket
        if (!Close())
            ReportError("QueryDone","Failed to close socket!");

        //Recreate it
        if (!Create())
            ReportError("QueryDone","Failed to create socket!");
    }

    //What are we
    if (m_bURL)
    {
        m_bDone=TRUE;

        //If error reset the string
        if (bError)
            m_sWhoisData="";
        //Do we need to get the additional server
        else if (m_bAdditionalServer)
            m_sAdditionalWhoisServer=ExtractAdditionalWhoisServer(m_sWhoisData);
        else
            m_sAdditionalWhoisServer="";

        //Call user routing
        WhoisDone(bError);
    }
    else if (m_aProgress!=wsNone)
    {
        //Check the text
        //Try to analyze it
        if (!bError &&
            m_sWhoisData.find(m_aWhoisNotFound[m_aProgress])==std::string::npos)
        {
            //We have it
            m_aServer=m_aProgress;

            //We are done
            m_bDone=TRUE;

            //Call user routing
            WhoisDone(FALSE);
        }
        else
        {
            //Decrease the progress
            m_aProgress=(WhoisServer)((int)m_aProgress-1);

            //Where are we
            if (m_aProgress==wsNone)
            {
                //We are done
                m_bDone=TRUE;
                m_bError=TRUE;

                //Call user routing
                WhoisDone(TRUE);
            }
            else if (!WhoisURL(m_sDataToSend,m_aIPWhois[m_aProgress]))
            {
                //Report it
                ReportError("QueryDone","Failed to connect!");

                //Try to move to the next one
                //Decrease the progress
                m_aProgress=(WhoisServer)((int)m_aProgress-1);

                //Call user routing
                QueryDone(TRUE,
                          TRUE);
            }
        }
    }
    else
        //We are done
        WhoisDone(TRUE);
}
ERROR_HANDLER("QueryDone")

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

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