Class AsyncServerStreamingCall<TResponse>
Return type for server streaming calls.
Inheritance
Inherited Members
Namespace: Grpc.Core
Assembly: Grpc.Core.dll
Syntax
public sealed class AsyncServerStreamingCall<TResponse> : IDisposable
Type Parameters
Name | Description |
---|---|
TResponse | Response message type for this call. |
Properties
ResponseHeadersAsync
Asynchronous access to response headers.
Declaration
public Task<Metadata> ResponseHeadersAsync { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.Task<Metadata> |
ResponseStream
Async stream to read streaming responses.
Declaration
public IAsyncStreamReader<TResponse> ResponseStream { get; }
Property Value
Type | Description |
---|---|
IAsyncStreamReader<TResponse> |
Methods
Dispose()
Provides means to cleanup after the call. If the call has already finished normally (response stream has been fully read), doesn't do anything. Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. As a result, all resources being used by the call should be released eventually.
Declaration
public void Dispose()
Implements
Remarks
Normally, there is no need for you to dispose the call unless you want to utilize the
"Cancel" semantics of invoking Dispose
.
GetStatus()
Gets the call status if the call has already finished. Throws InvalidOperationException otherwise.
Declaration
public Status GetStatus()
Returns
Type | Description |
---|---|
Status |
GetTrailers()
Gets the call trailing metadata if the call has already finished. Throws InvalidOperationException otherwise.
Declaration
public Metadata GetTrailers()
Returns
Type | Description |
---|---|
Metadata |