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 the reader to the next message, 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, \u003ccode\u003eMoveNext()\u003c/code\u003e returns \u003ccode\u003efalse\u003c/code\u003e if the call succeeds or throws \u003ccode\u003eRpcException\u003c/code\u003e if the call fails; on the server side, it returns \u003ccode\u003efalse\u003c/code\u003e in case of failure and does not throw any exception.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMoveNext()\u003c/code\u003e operations can be cancelled using a \u003ccode\u003eCancellationToken\u003c/code\u003e, with cancellation of an individual read operation having the same effect as cancelling the entire call, if the read operation hasn't finished.\u003c/p\u003e\n"],["\u003cp\u003eThe Current property returns the current element from the stream, and the MoveNext method returns a boolean \u003ccode\u003eTask\u003c/code\u003e indicating if the next message has been found.\u003c/p\u003e\n"]]],[],null,[]]