Class CICMPSocketAsync::
OnSocketReceive()
Base ClassesConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: GetAsyncHandleNext page: operator =    Show member index
Protected Function Declared in:
ICMPSocketAsync.h

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

virtual BOOL OnSocketReceive(
    int iErrorCode);

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

Handle incoming data

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

try
{
    //Here we receive the data
    if (!iErrorCode)
    {
        //Buffer, can be up to 65535
        char* pBuffer;
        pBuffer=new char[65535];

        //Protect the data
        CArray_ptr<char> pProtection(pBuffer);

        //Read the data
        int iRead;
        iRead=Receive(pBuffer,65535);

        //Process result
        BOOL bResult=FALSE;

        //Only if not an error
        if (iRead!=GetErrorCode())
            bResult=ProccessICMP(pBuffer);

        //Exit
        return bResult;
    }
    else
        return FALSE;
}
ERROR_HANDLER_RETURN("OnSocketReceive",FALSE)

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

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