Class KomodiaDNS::CDNSSocket::
Flush()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: DeleteProcNext page: GetData    Show member index
Private Function Declared in:
DNSSocket.h

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

BOOL Flush();

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

Flush the data

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

try
{
    //Are we connected ?
    if (m_aConnectionStatus!=csConnected)
        return TRUE;

    //Get the data
    WaitingRequests aData;
    aData=GetData();

    //Do while we have data
    while (aData.pData)
    {
        //Protect the data
        CArray_ptr<char> pProtection(aData.pData);

        //Send it
        if (!m_pTCP->Send(aData.pData,
                          aData.usSize))
        {
            //Write the error
            ReportError("Flush","Failed to send!");

            //Get the error
            return FALSE;
        }

        //Can we continue ?
        if (m_aConnectionStatus!=csConnected)
            aData.pData=NULL;
        else
            aData=GetData();
    }

    //We are done
    return TRUE;
}
ERROR_HANDLER_RETURN("Flush",FALSE)

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