BrotliStream.EndRead(IAsyncResult) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Waits for the pending asynchronous read to complete. (Consider using the ReadAsync(Byte[], Int32, Int32) method instead.)
public:
override int EndRead(IAsyncResult ^ asyncResult);
public override int EndRead (IAsyncResult asyncResult);
override this.EndRead : IAsyncResult -> int
Public Overrides Function EndRead (asyncResult As IAsyncResult) As Integer
Parameters
- asyncResult
- IAsyncResult
The reference to the pending asynchronous request to finish.
Returns
The number of bytes read from the stream, between 0 (zero) and the number of bytes you requested. BrotliStream returns 0 only at the end of the stream; otherwise, it blocks until at least one byte is available.
Exceptions
asyncResult
is null
.
asyncResult
did not originate from a BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) method on the current stream.
The end operation cannot be performed because the stream is closed.