Class KomodiaDNS::CDNSSocket::
Receive()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: ParseAnswerNext page: Send    Show member index
Public Function Declared in:
DNSSocket.h

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

CDNSAnswers * Receive();

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

Receive for block sockets

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

if (m_bAsync)
    return NULL; //We will receive it later

try
{
    //Here we initialize the receive of the DNS
    char* pBuffer;
    pBuffer=new char[2000];

    //How much data did we receive
    int iReceived=0;

    if (m_bUseTCP)
        iReceived=m_pTCP->Receive(pBuffer,
                                  2000);
    else
        iReceived=m_pUDP->Receive(pBuffer,
                                  2000);

    //Check if we had errors
    if (iReceived==CSpoofBase::GetErrorCode() ||
        !iReceived)
    {
        //Delete the memory
        delete [] pBuffer;

        //Done
        return FALSE;
    }

    //Parse it
    return SocketReceive(pBuffer,
                         iReceived,
                         m_bUseTCP);
}
ERROR_HANDLER_RETURN("Receive",NULL)

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