Initiates an asynchronous send operation.
The IAsyncResult that identifies the posted asynchronous request.
In asynchronous processing, you use BeginSend to raise the SendCompleted event when the send operation has completed.
To use BeginSend, create an event handler that processes the results of the asynchronous operation and associate it with your event delegate. BeginSend initiates an asynchronous send operation; the DnsClient is notified, through the raising of the SendCompleted event, when the send operation is completed. The DnsClient can then access the send status by calling EndSend.
Note: The BeginSend method returns immediately, but the asynchronous operation is not completed until the event handler is called.
Because BeginSend is asynchronous, you can call it to receive the send status without blocking the current thread of execution. To synchronously send, use the Send method.
Once an asynchronous operation completes, you can call BeginSend again in the event handler to keep receiving notifications.
The IAsyncResult that BeginSend 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 EndSend 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.
DnsClient Class | ComponentSpace.Dns Namespace | DnsClient.BeginSend Overload List