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

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

BOOL ReceiveWhois();

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

Receive data from the whois

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

try
{
    //Receive the data
    char aData[4000];

    //Infinite loop
    while (1)
    {
        //Get it
        int iSize;
        iSize=Receive(aData,sizeof(aData)/2-1);

        //How much size
        if (!iSize)
        {
            //Close the socket
            if (!Close())
                ReportError("ReceiveWhois","Failed to close socket!");

            //Recreate it
            if (!Create())
            {
                //Report it
                ReportError("ReceiveWhois","Failed to create socket!");

                //Exit
                return FALSE;
            }

            //Do we need to get the additional server
            if (m_bAdditionalServer)
                m_sAdditionalWhoisServer=ExtractAdditionalWhoisServer(m_sWhoisData);

            //Done
            return TRUE;
        }

        //Is an error
        if (iSize==GetErrorCode())
            return FALSE;

        //Remove nulls
        for (int iCounter=0;
             iCounter<iSize;
             iCounter++)
            if (!aData[iCounter])
                aData[iCounter]=10;

        //Set the terminating sero
        aData[iSize]=0;

        //Modify it
        ModifyBuffer(aData,iSize+1);

        //Add it to the string
        m_sWhoisData+=aData;
    }

    //Done
    return TRUE;
}
ERROR_HANDLER_RETURN("ReceiveWhois",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.