Pings the specified host and measures response time.
obj.Ping(Address String, Data String, RoundTripMs Long) Where obj is an OpScrUtil.INet object.
Address
|
Specifies the destination of the ping request. |
Data
|
Contains the data to send in the request. |
RoundTripMs
|
Number of milliseconds elapsed between sending the request and receiving the reply. |
Boolean.
To ping the
www.missioncritical.com
server, raising an alert if
the ping fails or it takes longer than 500 milliseconds, enter:
Set obj = CreateObject("OpScrUtil.INet") bOK = obj.Ping("www.missioncritical.com", varData, varRoundTripMs) If bOK Then If varRoundTripMs > 500 Then 'Raise an alert End If Else strError = obj.GetError() 'Create an alert End If
This example shows how to ping a server and respond according to the response time.