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