Ends a pending asynchronous send to a specific location.
[Visual Basic]
Overridable Public Function EndSendTo( _
ByVal asyncResult As IAsyncResult _
) As Integer
If successful, the number of bytes sent; otherwise, an invalid VirtualSocket error.
To maintain the asynchronous nature of the operation, call this method from the callback delegate. You can pass either the IAsyncResult returned from BeginSendTo or the callback delegate used as an input parameter to BeginSendTo as the asyncResult parameter. The EndSendTo method frees any resources allocated by the BeginSendTo method. The EndSendTo method blocks until send is complete.
The EndSendTo method frees any resources allocated by the BeginSendTo method.
Exception Type | Condition |
---|---|
ArgumentNullException | asyncResult is a null reference (Nothing in Visual Basic). |
ArgumentException | asyncResult was not returned by a call to the BeginSendTo method. |
InvalidOperationException | EndSendTo was previously called for the asynchronous read. |
SocketException | An operating system error occurs while accessing the VirtualSocket. |
ObjectDisposedException | The VirtualSocket has been closed. |
VirtualSocket Class | VirtualSocket Members | Org.Mentalis.Security.Ssl Namespace