Class CRealTimeTraceRouteSocket::
CRealTimeDNSManager::OnDNSReceive()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: CRealTimeDNSManager::OnDNSErrorNext page: CRealTimeDNSManager::OnDNSTimeout    Show member index
Private Function
(Not Declared)
Declared in:
RealTimeTraceRouteSocket.h

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

void CRealTimeDNSManager::OnDNSReceive(
    KomodiaDNS::CDNSAnswers* pAnswers,
    LPVOID lpLocalIDData);

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

try
{
    //Protect the answers
    std::auto_ptr<KomodiaDNS::CDNSAnswers> pProtection(pAnswers);

    //Are we done
    if (m_pFather->m_bTraceDone)
        return;

    //Is it resolved ?
    if (lpLocalIDData)
    {
        //Get it
        TraceRouteData* pData;
        pData=(TraceRouteData*)lpLocalIDData;

        //Remove ourselves
        pData->pDNS=NULL;

        //Check the data
        if (pAnswers->IsResolved())
            //Do we have an answer
            if (!pAnswers->GetAnswer().empty())
            {
                //Save it
                pData->sReverseDNS=pAnswers->GetAnswer();

                //We are sesolved
                pData->bResolved=TRUE;

                //Do we have an address
                if (pData->aReplyingAddress)
                {
                    //Call for modify
                    m_pFather->TraceDataForModify(pData,
                                                  TRUE);

                    //Call father
                    m_pFather->TraceData(pData,
                                         TRUE);
                }
            }
            else
                ReportError("CRealTimeDNSManager","Received empty answer!");
    }

    //Adjust the resolvers
    m_pFather->AdjustResolvers(-1);

    //We are done
    m_pFather->DNSDone();
}
ERROR_HANDLER("OnDNSReceive")

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

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