Class CUDPRelay::
CListenSocket::OnSocketReceive()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: CListenSocket::CListenSocketNext page: CListenSocket::~CListenSocket    Show member index
Private Function
(Not Declared)
Declared in:
UDPRelay.h

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

BOOL CListenSocket::OnSocketReceive(
    int iErrorCode);

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

try
{
    if (iErrorCode)
    {
        //Report it
        ReportError("OnSocketReceive","Received an error code!",iErrorCode);

        //Done
        return FALSE;
    }

    char cBuffer[65536];

    //Data information
    IP aIP;
    unsigned short usPort;

    //Get the data
    int iResult;
    iResult=Receive(cBuffer,
                    sizeof(cBuffer),
                    aIP,
                    usPort);

    //Did we receive anything?
    if (iResult>0)
        //Send the data
        m_pFather->SendData(cBuffer,
                            iResult,
                            aIP,
                            usPort);
    else
        //Report the error
        ReportErrorOS("OnSocketReceive","Failed to receive data!");

    //Done
    return TRUE;
}
ERROR_HANDLER_RETURN("OnSocketReceive",FALSE)

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

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