Interface IAsyncStream<T>
- Namespace
- IceRpc
- Assembly
- IceRpc.dll
Represents an incoming stream of elements decoded from a request or response payload.
public interface IAsyncStream<out T> : IAsyncEnumerable<T>, IDisposable
Type Parameters
TThe type of the streamed elements.
- Inherited Members
- Extension Methods
Remarks
An IAsyncStream<T> owns the underlying transport PipeReader from which elements are decoded. It is the caller's responsibility to complete this reader by disposing the stream, or iterating over its elements, or doing both.
<p><xref href="IceRpc.IAsyncStream%601" data-throw-if-not-resolved="false"></xref> is not thread-safe in general, but <xref href="System.IDisposable.Dispose" data-throw-if-not-resolved="false"></xref> may
be called concurrently with an in-progress or just-starting <code>MoveNextAsync</code>: the in-flight read is unblocked
and the consumer's <code>MoveNextAsync</code> throws <xref href="System.ObjectDisposedException" data-throw-if-not-resolved="false"></xref>.</p>