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.
Remarks
Normally, there is no need for you to dispose the call unless you want to utilize the
"Cancel" semantics of invokingDispose.
GetStatus()
public Status GetStatus()
Gets the call status if the call has already finished.
Throws InvalidOperationException otherwise.
[[["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\u003eAsyncServerStreamingCall<TResponse>\u003c/code\u003e is a sealed class designed for handling server streaming calls, providing methods to manage response streams, headers, status, and trailers.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements \u003ccode\u003eIDisposable\u003c/code\u003e, enabling resource cleanup and call cancellation, although disposal is typically unnecessary unless specific "Cancel" semantics are needed.\u003c/p\u003e\n"],["\u003cp\u003eIt offers properties like \u003ccode\u003eResponseHeadersAsync\u003c/code\u003e to access asynchronous response headers and \u003ccode\u003eResponseStream\u003c/code\u003e to read the streaming responses via an \u003ccode\u003eIAsyncStreamReader\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAsyncServerStreamingCall<TResponse>\u003c/code\u003e includes methods like \u003ccode\u003eGetStatus()\u003c/code\u003e and \u003ccode\u003eGetTrailers()\u003c/code\u003e to retrieve call status and trailing metadata, respectively, but these can only be used once the call has already completed.\u003c/p\u003e\n"],["\u003cp\u003eThis class has two constructors that create a new object with the specified properties.\u003c/p\u003e\n"]]],[],null,["# Class AsyncServerStreamingCall<TResponse> (2.66.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.66.0 (latest)](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncServerStreamingCall-1)\n- [2.63.0](/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.AsyncServerStreamingCall-1)\n- [2.48.0](/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.AsyncServerStreamingCall-1) \n\n public sealed class AsyncServerStreamingCall\u003cTResponse\u003e : IDisposable\n\nReturn type for server streaming calls. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AsyncServerStreamingCall\\\u003cTResponse\\\u003e \n\nImplements\n----------\n\n[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable) \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Grpc.Core](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)\n\nAssembly\n--------\n\nGrpc.Core.Api.dll\n\nConstructors\n------------\n\n### AsyncServerStreamingCall(IAsyncStreamReader\\\u003cTResponse\\\u003e, Func\\\u003cobject, Task\\\u003cMetadata\\\u003e\\\u003e, Func\\\u003cobject, Status\\\u003e, Func\\\u003cobject, Metadata\\\u003e, Action\\\u003cobject\\\u003e, object)\n\n public AsyncServerStreamingCall(IAsyncStreamReader\u003cTResponse\u003e responseStream, Func\u003cobject, Task\u003cMetadata\u003e\u003e responseHeadersAsync, Func\u003cobject, Status\u003e getStatusFunc, Func\u003cobject, Metadata\u003e getTrailersFunc, Action\u003cobject\u003e disposeAction, object state)\n\nCreates a new AsyncDuplexStreamingCall object with the specified properties.\n\n### AsyncServerStreamingCall(IAsyncStreamReader\\\u003cTResponse\\\u003e, Task\\\u003cMetadata\\\u003e, Func\\\u003cStatus\\\u003e, Func\\\u003cMetadata\\\u003e, Action)\n\n public AsyncServerStreamingCall(IAsyncStreamReader\u003cTResponse\u003e responseStream, Task\u003cMetadata\u003e responseHeadersAsync, Func\u003cStatus\u003e getStatusFunc, Func\u003cMetadata\u003e getTrailersFunc, Action disposeAction)\n\nCreates a new AsyncDuplexStreamingCall object with the specified properties.\n\nProperties\n----------\n\n### ResponseHeadersAsync\n\n public Task\u003cMetadata\u003e ResponseHeadersAsync { get; }\n\nAsynchronous access to response headers.\n\n### ResponseStream\n\n public IAsyncStreamReader\u003cTResponse\u003e ResponseStream { get; }\n\nAsync stream to read streaming responses.\n\nMethods\n-------\n\n### Dispose()\n\n public void Dispose()\n\nProvides means to cleanup after the call.\nIf the call has already finished normally (response stream has been fully read), doesn't do anything.\nOtherwise, requests cancellation of the call which should terminate all pending async operations associated with the call.\nAs a result, all resources being used by the call should be released eventually.\n**Remarks** \nNormally, there is no need for you to dispose the call unless you want to utilize the\n\"Cancel\" semantics of invoking `Dispose`.\n\n### GetStatus()\n\n public Status GetStatus()\n\nGets the call status if the call has already finished.\nThrows InvalidOperationException otherwise.\n\n### GetTrailers()\n\n public Metadata GetTrailers()\n\nGets the call trailing metadata if the call has already finished.\nThrows InvalidOperationException otherwise."]]