Class CPingSocket::
Ping()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: PingNext page: PingDone    Show member index
Public Function Declared in:
PingSocket.h

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

virtual BOOL Ping(
    IP aDestinationAddress,
    DWORD dwTimeout=3000);

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

try
{
    //Set some initial data
    m_ucTTL=0;
    m_aReplyingAddress=0;
    m_bTimeout=FALSE;
    m_dwTimeElapsed=0;
    m_iDataSize=0;
    m_dwTimeout=dwTimeout;

    //What is the timeout
    if (dwTimeout)
        //Set the timeout
        SetTimeout(dwTimeout);

    //Set ping timer
    m_dwLastTick=GetTickCount();

    //Set ping done
    m_bPingDone=FALSE;

    if (!m_bSameID)
        //What is our ID
        m_usLastPingID=GetTickCount()*GetCurrentProcessId();

    //Send the ping
    return SendEcho(aDestinationAddress,
                    FALSE,
                    m_usLastPingID,
                    m_usLastPingSequence,
                    0)!=GetErrorCode();
}
ERROR_HANDLER_RETURN("Ping",FALSE)

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

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