See Also

Ping Members  | Dart.PowerTCP.SslSockets Namespace

Requirements

Namespace: Dart.PowerTCP.SslSockets

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Dart.PowerTCP.SslSockets (in Dart.PowerTCP.SslSockets.dll)

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Requirements Languages PowerTCP SSL Sockets for .NET

Ping Class

Dart.PowerTCP.SslSockets Namespace : Ping Class

The Ping component enables easy Ping functionality in an application.

For a list of all members of this type, see Ping members.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         Dart.PowerTCP.SslSockets.Ping

Syntax

[Visual Basic]
<LicenseProviderAttribute(PingLicenseProvider)> Public Class Ping    Inherits Component
[C#]
[LicenseProviderAttribute(PingLicenseProvider)] public class Ping : Component
[C++]
[LicenseProviderAttribute(PingLicenseProvider)] public __gc class Ping : public Component
[C++/CLI]
[LicenseProviderAttribute(PingLicenseProvider)] public ref class Ping : public Component

Remarks

The Ping component is used to determine if a host is reachable by sending an ICMP echo. This is performed by sending an ICMP echo request message to a host, receiving the ICMP echo reply, and calculating the time difference. Both asynchronous and synchronous use is fully supported. In addition, you can choose to ping with an ICMP packet (the default), a UDP packet, or a TCP connection attempt.

Example

The following example demonstrates a default ping operation.

[Visual Basic] 

Try
   ' Ping a host
   Dim er As EchoResult = Ping1.Send("www.dart.com")

   ' Display results
   Debug.WriteLine("Response from www.dart.com")
   Debug.WriteLine("Sequence number " + er.Sequence)
   Debug.WriteLine("Delay " + er.ResponseTime)
   Debug.WriteLine("Bytes " + er.Data.Length)

Catch ex as Exception
    Debug.WriteLine("Cannot reach www.dart.com")
End Try

[C#] 


try
{
  
// Ping a host
  
EchoResult er = ping1.Send("www.dart.com");

  
// Display results
  
Debug.WriteLine("Response from www.dart.com");
  Debug.WriteLine(
"Sequence number " + er.Sequence);
  Debug.WriteLine(
"Delay " + er.ResponseTime);
  Debug.WriteLine(
"Bytes " + er.Data.Length);
}
catch(Exception ex)
{
  Debug.WriteLine(
"Cannot reach www.dart.com");
}
                

Requirements

Namespace: Dart.PowerTCP.SslSockets

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Dart.PowerTCP.SslSockets (in Dart.PowerTCP.SslSockets.dll)

See Also

Ping Members  | Dart.PowerTCP.SslSockets Namespace

 

Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.