Class CWhoisSocket::
WhoisURL()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: WhoisURLNext page: Custom Code in Header Before Includes    Show member index
Public Function Declared in:
WhoisSocket.h

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

BOOL WhoisURL(
    const std::string& rURL,
    const std::string& rWhoisServer);

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

try
{
    //Try to resolve the URL
    IP aAddress;
    aAddress=ResolveDNS(rWhoisServer.c_str());

    //Do we have it
    if (!aAddress)
    {
        //Report it
        ReportError("WhoisURL","Failed to resolve whois server!");

        //Exit
        return FALSE;
    }

    //Set some data
    m_bDone=FALSE;
    m_bError=FALSE;
    m_sWhoisData="";
    m_sDataToSend=rURL;
    m_sAdditionalWhoisServer="";
    m_bAdditionalServer=rWhoisServer=="whois.crsnic.net";

    //Try to connect
    if (!Connect(aAddress,43))
    {
        //Report it
        ReportError("WhoisURL","Failed to connect!");

        //Not done
        m_bDone=TRUE;

        //We have errors
        m_bError=TRUE;

        //Exit
        return FALSE;
    }

    //Are we async ?
    if (!m_bAsync)
        if (!SendURL(rURL))
        {
            //Report it
            ReportError("WhoisURL","Failed to send data!");

            //Not done
            m_bDone=TRUE;

            //We have errors
            m_bError=TRUE;

            //Exit
            return FALSE;
        }
        else
            return ReceiveWhois();
    else
        return TRUE;
}
ERROR_HANDLER_RETURN("WhoisURL",FALSE)

'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.