Ping Method


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 destination 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 due to other network issues.

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Network.Ping Method

  • System.Net.NetworkInformation.Ping Class

See Also

Network Object




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net