Method EndRead
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
EndRead(IAsyncResult)
public override int EndRead(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResult
The reference to the pending asynchronous request to finish.
Returns
The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available.
Exceptions
asyncResult
is null.
A handle to the pending read operation is not available.
-or-
The pending operation does not support reading.
asyncResult
did not originate from a BeginRead(byte[], int, int, AsyncCallback, object) method on the current stream.
The stream is closed or an internal error has occurred.