PeerNameResolver.ResolveAsyncCancel Method (Object)
Cancels the specified asynchronous peer name resolution request.
Assembly: System.Net (in System.Net.dll)
This method does not return a value.
Calling this method guarantees the system will not attempt to obtain additional records for the specified PeerName. If this method is called when an asynchronous peer name resolution operation is not outstanding, it acts as a "no operation" (NO OP).
The userState object must be provided since it is used to track a specific asynchronous call when multiple calls are in progress. This caller-supplied object is unique for each peer name resolution request.
This method will return immediately, but the operation may or may not immediately cancel. The event arguments returned by the ResolveCompleted event contains a field which can be polled by clients to determine whether cancellation occurred.
Calling this method ensures the ResolveCompleted event will be signaled as soon as possible with the event argument Cancelled set to true.
Available since 3.5