![]() |
PingDone() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: TraceRouteSocket.h |
Declaration
virtual void PingDone(
BOOL bTimeout);
DescriptionEvents for user to overide
Function Body
try
{
//The data record
TraceRouteData aData;
aData.ucTTL=m_ucTTL;
aData.bTimeout=bTimeout;
aData.dwElapsedTime=GetTimeElapsed();
//Is it a timeout ?
if (bTimeout)
//Can we ping again
if (m_ucTTL>m_ucMaxTTL)
m_bTraceDone=TRUE;
else
;
else
{
//Save the data
aData.aReplyingAddress=GetReplyingAddress();
//Are we done
if (aData.aReplyingAddress==m_aFinalAddress)
m_bTraceDone=TRUE;
}
//Add the data
m_aData.push_back(aData);
//Call user with the data
TraceData(aData);
//Check if we are done ?
if (m_bTraceDone ||
(bTimeout &&
m_ucTTL>m_ucMaxTTL))
//Dispatch the event
TraceDone();
else
{
//Increase our ttl
++m_ucTTL;
//Send the next ping
if (!Ping(m_aFinalAddress,
m_dwTimeout))
{
//There's an error report and continue
ReportError("PingDone","Failed to ping!");
//Make it a timeout
PingDone(TRUE);
}
}
}
ERROR_HANDLER("PingDone")
See Also
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. |