
596
|
Chapter 13: The ‘My’ Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
See Also
ClassesRoot Property, CurrentConfig Property, CurrentUser Property, DynData Prop-
erty, GetValue Method, LocalMachine Property, Registry Object, SetValue Method,
Users Property
Ping Method
Location
My.Computer.Network.Ping
Syntax
Dim result As Boolean = My.Computer.Network.Ping(host[, timeout])
or:
Dim result As Boolean = My.Computer.Network.Ping(uri[, timeout])
host (required in syntax 1; String)
The IP address, Internet domain, URL, or computer name of the system to ping.
uri (required in second syntax; System.Uri)
The uniform resource identifier of the system to ping.
timeout (optional; Integer)
The number of milliseconds to wait before skipping a ping request. By default,
the timeout is 500 milliseconds.
Description
The Ping method can be used to test for the presence of another system by making an
ICMP protocol echo request over an IP network. This method returns
True if the desti-
nation system was successfully Ping’d or
False on a lack of success.
Usage at a Glance
Even if the Ping method returns False, the destination system may still be running and
on the network. Causes for failure include the ping protocol being turned off on the
target system, the ping request being blocked by a firewall, or a failure of the packet to
reach the target system ...