![]() |
Ping() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: PingSocket.h |
Declaration
virtual BOOL Ping(
IP aDestinationAddress,
DWORD dwTimeout=3000);
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
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. |