Home | Contact Us | Download | Support | Purchase | Products


Product List
 
  "Want to thank you guys for a great product and offer the following testimonial -- I wasted hours of my time trying to send a web page as an email using the older CDO components in .NET - luckily I found aspnetEmail as the solution to my problem. Quick, easy and efficient - best of all the price is reasonable. "
Oliver
Cape Town Accommodation
 
More
Testimonies

TraceRoute Asychronously

The following example demonstrates how to perform a TraceRoute asynchronously.

[C#]

 using System;
 using aspNetTraceRoute;
 namespace ConsoleApplication1
 {
 	class Class1
 	{
 		static void Main(string[] args)
 		{
 			TraceRouteClient client = new TraceRouteClient();
 			client.BeginTraceRoute( "www.yahoo.com", 30, true, new AsyncCallback( MyCallback ), client );
 
 			Console.WriteLine( "done.");
 			Console.ReadLine();
 			
 		}
 
 		static void MyCallback( IAsyncResult iar )
 		{
 			try
 			{
 				TraceRouteClient client = (TraceRouteClient)iar.AsyncState;
 				TraceRouteReplyCollection results = client.EndTraceRoute( iar );
 				Console.WriteLine( results.ToString() );
 			}
 			catch(Exception ex )
 			{
 				Console.WriteLine( ex.ToString() );
 			}
 
 		}
 	}
 }


[VB.NET]

 Imports System
 Imports aspNetTraceRoute
 Module Module1
 
     Sub Main()
         Dim client As New TraceRouteClient()
         client.BeginTraceRoute("www.yahoo.com", 30, True, AddressOf MyCallback, client)
 
         Console.WriteLine("done.")
         Console.ReadLine()
     End Sub
 
     Sub MyCallback(ByVal iar As IAsyncResult)
         Try
             Dim client As TraceRouteClient = CType(iar.AsyncState, TraceRouteClient)
             Dim results As TraceRouteReplyCollection = client.EndTraceRoute(iar)
             Console.WriteLine(results.ToString())
         Catch ex As Exception
             Console.WriteLine(ex.ToString())
         End Try
     End Sub 'MyCallback 
 
 
 
 End Module











 

 

 

 



The box is not shipped. aspNetTraceRoute is a downloadable product.