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

Trace .NET Component (TraceRoute)

Use the Trace component to trace a route to a host. Features include:

  • HopType property gives you unprecedented control over how hops are handled:
    • HopType.SyncHops means the application waits for response from the previous hop before sending data to a new hop.
    • HopType.AsyncHops means the application sends all hops at once for unprecidented traceroute speed.
    • HopType.AsyncEchoes means the applications waits for response from the previous hop before sending data to a new hop, but all data sent to the new hop occurs asynchronously.
  • Set MaxHops to control the maximum amount of hops to take when tracing a route.
  • Hop event is raised whenever data is received from a new hop.
  • Trace routes synchronously or asynchronously.
  • Design-time editor assists in protocol testing.
  • Full TraceRoute C# and TraceRoute VB.NET samples.
  • 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!

Interface

Public Constructors
Trace Overloaded. Initialize a new instance of the Trace 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.
HopType Enumerates the values which determine the behavior of the individual hops when performing a trace route operation.
MaxHops Gets and sets the maximum number of hops to take when attempting to reach a host.
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
Abort Abruptly stop the trace operation.
BeginSend Overloaded. Asynchronously trace a route to a host.
Send Overloaded. Trace a route to a host.
Public Events
EndSend Raised when the Trace.BeginSend request completes.
Hop Raised when a single hop is complete.

Code Example

How easy is the Trace component to use? The following example demonstrates how to trace a route to a host

VB.NET Example
Private Sub TraceTest()
   ' Set all hops and echoes to be synchronous
   Trace1.HopType = HopType.SynchHops

   ' Begin the trace operation
   Dim tr As TraceResult = Trace1.Send("www.dart.com")

   ' Trace operation is complete, display info.
   Debug.WriteLine("Total hops: " & tr.Hops.Length)
End Sub

Private Sub Trace1_Hop(ByVal sender As Object, ByVal e As Dart.PowerTCP.Sockets.HopEventArgs) Handles Trace1.Hop   
   
   ' Check for any exceptions
   If Not e.Exception Is Nothing Then
      ' Display information about the hop
      Debug.WriteLine("Time-to-live for the hop: " & e.Result.TTL)
      Debug.WriteLine("Remote address: " & e.Result.RemoteAddress)

      ' Now display info about each of the three echoes
      Debug.WriteLine("Response times for this hop")
      Dim er As EchoResult
      For Each er In e.Result.Echoes
         Debug.WriteLine(er.ResponseTime)
      Next
   End If
End Sub