Ends a pending asynchronous send.
[Visual Basic]
Overridable Public Function EndSend( _
ByVal asyncResult As IAsyncResult _
) As Integer
If successful, the number of bytes sent to the VirtualSocket; 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 BeginSend or the callback delegate used as an input parameter to BeginSend as the asyncResult parameter. The EndSend method frees any resources allocated by the BeginSend method. The EndSend method blocks until the send ends.
The EndSend method frees any resources allocated by the BeginSend method.
Exception Type | Condition |
---|---|
ArgumentNullException | asyncResult is a null reference (Nothing in Visual Basic). |
ArgumentException | asyncResult was not returned by a call to the BeginSend method. |
InvalidOperationException | EndSend 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