See Also

EchoResult Class  | EchoResult Members

Requirements

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

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages PowerTCP SSL Sockets for .NET

Data Property

Dart.PowerTCP.SslSockets Namespace > EchoResult Class : Data Property

Returns data that is returned from the echo request.

[Visual Basic]
Public ReadOnly Property Data As Byte()
[C#]
public byte[] Data {get;}
[C++]
public: __property byte[]* get_Data();
[C++/CLI]
public: property array<byte>^ Data {    array<byte>^ get(); }

Return Type

A string value representing the data sent to and subsequently returned from the remote host.

Remarks

When a ping or traceroute request is sent any data that is included as part of the packet is returned to the sender. This data can be specified in the ping request by passing it in as the data parameter in the Send or BeginSend methods. This data can be specified in the traceroute request by passing it in as the data parameter in the Send or BeginSend methods. If data is not specified, default data is used (32 occurrences of "&").

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

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

See Also

EchoResult Class  | EchoResult Members


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.