Skip to content
Snippets Groups Projects
Commit 2eb09ee5 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

improve docs for IAsyncStreamReader

parent febfd32a
No related branches found
No related tags found
No related merge requests found
...@@ -41,10 +41,24 @@ namespace Grpc.Core ...@@ -41,10 +41,24 @@ namespace Grpc.Core
{ {
/// <summary> /// <summary>
/// A stream of messages to be read. /// A stream of messages to be read.
/// Messages can be awaited <c>await reader.MoveNext()</c>, that returns <c>true</c>
/// if there is a message available and <c>false</c> if there are no more messages
/// (i.e. the stream has been closed).
/// <para>
/// On the client side, the last invocation of <c>MoveNext()</c> either returns <c>false</c>
/// if the call has finished successfully or throws <c>RpcException</c> if call finished
/// with an error. Once the call finishes, subsequent invocations of <c>MoveNext()</c> will
/// continue yielding the same result (returning <c>false</c> or throwing an exception).
/// </para>
/// <para>
/// On the server side, <c>MoveNext()</c> does not throw exceptions.
/// In case of a failure, the request stream will appear to be finished
/// (<c>MoveNext</c> will return <c>false</c>) and the <c>CancellationToken</c>
/// associated with the call will be cancelled to signal the failure.
/// </para>
/// </summary> /// </summary>
/// <typeparam name="T">The message type.</typeparam> /// <typeparam name="T">The message type.</typeparam>
public interface IAsyncStreamReader<T> : IAsyncEnumerator<T> public interface IAsyncStreamReader<T> : IAsyncEnumerator<T>
{ {
// TODO(jtattermusch): consider just using IAsyncEnumerator instead of this interface.
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment