A stream of messages to be read.
Messages can be awaitedawait reader.MoveNext(), that returnstrueif there is a message available andfalseif there are no more messages
(i.e. the stream has been closed).
On the client side, the last invocation ofMoveNext()either returnsfalseif the call has finished successfully or throwsRpcExceptionif call finished
with an error. Once the call finishes, subsequent invocations ofMoveNext()will
continue yielding the same result (returningfalseor throwing an exception).
On the server side,MoveNext()does not throw exceptions.
In case of a failure, the request stream will appear to be finished
(MoveNextwill returnfalse) and theCancellationTokenassociated with the call will be cancelled to signal the failure.
MoveNext()operations can be cancelled via a cancellation token. Cancelling
an individual read operation has the same effect as cancelling the entire call
(which will also result in the read operation returning prematurely), but the per-read cancellation
tokens passed to MoveNext() only result in cancelling the call if the read operation haven't finished
yet.
Task containing the result of the operation: true if the reader was successfully advanced
to the next element; false if the reader has passed the end of the sequence.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eIAsyncStreamReader<T>\u003c/code\u003e is an interface for reading a stream of messages, where \u003ccode\u003eT\u003c/code\u003e represents the message type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMoveNext()\u003c/code\u003e method is used to asynchronously advance through the stream, returning \u003ccode\u003etrue\u003c/code\u003e if a message is available and \u003ccode\u003efalse\u003c/code\u003e if the stream is closed.\u003c/p\u003e\n"],["\u003cp\u003eOn the client side, a finished call will either result in \u003ccode\u003eMoveNext()\u003c/code\u003e returning \u003ccode\u003efalse\u003c/code\u003e or throwing an \u003ccode\u003eRpcException\u003c/code\u003e, whereas on the server, \u003ccode\u003eMoveNext()\u003c/code\u003e will only return \u003ccode\u003efalse\u003c/code\u003e in case of a failure.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eMoveNext()\u003c/code\u003e operation can be cancelled using a \u003ccode\u003eCancellationToken\u003c/code\u003e, which has the same effect as cancelling the entire call, although the cancellation only occurs if the operation has not finished.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCurrent\u003c/code\u003e property provides access to the current element of type \u003ccode\u003eT\u003c/code\u003e in the iteration.\u003c/p\u003e\n"]]],[],null,[]]