Dart.PowerTCP.SslSockets Namespace > EchoResult Class : ResponseTime Property |
Returns the amount of time in milliseconds for the server to respond to the echo request.
[Visual Basic]
Public ReadOnly Property ResponseTime As Integer
[C#]
public int ResponseTime {get;}
[C++]
public: __property int get_ResponseTime();
An integer value representing the amount of time in milliseconds for the server to respond to the echo request.
Check this property for the amount of time in milliseconds it took for the server to respond to the echo request.
If PingType is PingType.ICMP or PingType.UDP, this property should be an accurate reflection of the actual server response time. If PingType is PingType.TCP, this property will probably be inflated due to the TCP protocol overhead.
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");
}
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
EchoResult Class | EchoResult Members
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.