Sends an IPv4 ICMP echo request, also known as ping, and returns any echo response replies.
IcmpPing(cArrayName, cHost [, nTTL [, nTOS [, nTimeout [, nDatasize [, bDontFragment [, nPingCount]]]]]])
Parameters
- cArrayname
On return the array contains the following information:
If the ping succeededColumn Content Datatype 1 return IP address C 2 Roundtrip time in milliseconds N 3 Status N 4 Data was retrieved back successfully L
If the ping failedColumn Content 1 empty string 2 -1 3 -1 4 .F.
- cHost
Either an IP address or a hostname.
e.g. "192.168.1.128", "www.google.com"
- nTTL (optional)
default = 30
Time To Live for the network packet.
- nTOS (optional)
default = 0
Type Of Service.
- nTimeout (optional)
default = 3000ms
Timeout in milliseconds.
- nDatasize (optional)
default = 32 (bytes)
Number of bytes to send.
- bDontFragment (optional)
default = .F.
May the packet be fragmented?
- nPingCount (optional)
default = 1
The number of pings to send, each ping result will be stored into a new row of the array.
Return Value
The number of executed pings.
See Also
Reference
AbortUrlDownloadToFileEx
AIpAddresses
ANetFiles
ANetServers
GetServerTime
Ip2MacAddress
ResolveHostToIp
SyncToSNTPServer
UrlDownloadToFileEx