Initiates an asynchronous trace route operation.
The IAsyncResult that identifies the posted asynchronous request.
In asynchronous processing, you use BeginTraceRoute to raise the TraceRouteCompleted event when the trace route operation has completed.
To use BeginTraceRoute, create an event handler that processes the results of the asynchronous operation and associate it with your event delegate. BeginTraceRoute initiates an asynchronous send operation; the TraceRouteClient is notified, through the raising of the TraceRouteCompleted event, when the trace route operation is completed. The TraceRouteClient can then access the trace route status by calling EndTraceRoute.
Note: The BeginTraceRoute method returns immediately, but the asynchronous operation is not completed until the event handler is called.
Because BeginTraceRoute is asynchronous, you can call it to receive the trace route status without blocking the current thread of execution. To synchronously trace route, use the TraceRoute method.
Once an asynchronous operation completes, you can call BeginTraceRoute again in the event handler to keep receiving notifications.
The IAsyncResult that BeginTraceRoute returns identifies the asynchronous operation that the method call started. You can use this IAsyncResult throughout the lifetime of the operation, although you generally do not use it until EndTraceRoute is called. However, if you start several asynchronous operations, you can place their IAsyncResult values in an array and specify whether to wait for all operations or any operation to complete. In this case, you use the AsyncWaitHandle property of the IAsyncResult to identify the completed operation.
TraceRouteClient Class | ComponentSpace.TraceRoute Namespace | TraceRouteClient.BeginTraceRoute Overload List