Version: 1.1.1.0
Create multi-threaded servers and powerful Internet applications in .NET.

Ping .NET Component

Use the Ping component to integrate Ping functionality into any .NET application, allowing your application to easily check if a host is reachable by sending and receiving ICMP packets. Features include:

  • Easy-to-use Send method sends a ping to a host.
  • Send a "default" ping, or send a ping while specifying optional data, sequence number, and TTL.
  • Server Response is encaspulated in an EchoResult object, providing easy access to all aspects of a ping response.
  • PingType property allows you to ping using ICMP, UDP, or TCP. This is helpful in circumventing firewalls and allows pinging in ANY environment (whereas some environments limit the sending of ICMP packets).
  • Ping hosts synchronously or asynchronously.
  • Design-time editor assists in protocol testing.
  • C# and VB.NET sample projects are included.
  • Integrates with all versions of Visual Studio and supports C#, VB.NET, ASP.NET, Delphi 8, C# Builder, and other .NET compliant development environments.
  • Includes a royalty-free license!

Looking for the ActiveX version of this component?

Interface

Public Constructors
Ping Overloaded. Initialize a new instance of the Ping class.
Public Properties
DoEvents Gets or sets a value that controls the processing of events during blocking method calls.
Editor In Visual Studio.NET, displays an interactive form to use to test real time protocol operations.
PingType Gets or sets whether the Ping sent is an ICMP packet, a UDP packet, or a TCP connection attempt.
Tag Gets or sets an object reference that can be used to associate this instance with any other.
Timeout Specifies the maximum number of milliseconds to wait for responses to commands or time between data buffer transfers.
Public Methods
BeginSend Overloaded. Asynchronously determine if a host is reachable, specifying a TTL, sequence number, and additional data to send.
Send Overloaded. Determine if a host is reachable, specifying a TTL, sequence number, and additional data to send.
Public Events
EndSend Raised when the Ping.BeginSend request completes.

Code Example

How easy is the Ping component to use? Check out the following example, which demonstrates pinging a remote host.

VB.NET Example
' Ping the host.
Dim er as EchoResult = Ping1.Send("www.dart.com")

' EchoResult er describes the ping. Display properties of the EchoResult.
Debug.WriteLine("Reply from " + er.RemoteAddress)
Debug.WriteLine("Bytes " + er.Data.Length)
Debug.WriteLine("Time " + er.ResponseTime)
Debug.WriteLine("TTL " + er.TTL)