Grpc.Core.AsyncServerStreamingCall-1.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class AsyncServerStreamingCall&lt;TResponse&gt;
  8. | gRPC for .NET </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class AsyncServerStreamingCall&lt;TResponse&gt;
  11. | gRPC for .NET ">
  12. <meta name="generator" content="docfx 2.36.0.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <meta property="docfx:navrel" content="../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../index.html">
  34. <img id="logo" class="svg" src="../logo.svg" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Grpc.Core.AsyncServerStreamingCall`1">
  73. <h1 id="Grpc_Core_AsyncServerStreamingCall_1" data-uid="Grpc.Core.AsyncServerStreamingCall`1" class="text-break">Class AsyncServerStreamingCall&lt;TResponse&gt;
  74. </h1>
  75. <div class="markdown level0 summary"><p>Return type for server streaming calls.</p>
  76. </div>
  77. <div class="markdown level0 conceptual"></div>
  78. <div class="inheritance">
  79. <h5>Inheritance</h5>
  80. <div class="level0"><span class="xref">IDisposable</span></div>
  81. <div class="level1"><span class="xref">AsyncServerStreamingCall&lt;TResponse&gt;</span></div>
  82. </div>
  83. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  84. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  85. <h5 id="Grpc_Core_AsyncServerStreamingCall_1_syntax">Syntax</h5>
  86. <div class="codewrapper">
  87. <pre><code class="lang-csharp hljs">public sealed class AsyncServerStreamingCall&lt;TResponse&gt; : IDisposable</code></pre>
  88. </div>
  89. <h5 class="typeParameters">Type Parameters</h5>
  90. <table class="table table-bordered table-striped table-condensed">
  91. <thead>
  92. <tr>
  93. <th>Name</th>
  94. <th>Description</th>
  95. </tr>
  96. </thead>
  97. <tbody>
  98. <tr>
  99. <td><span class="parametername">TResponse</span></td>
  100. <td><p>Response message type for this call.</p>
  101. </td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. <h3 id="constructors">Constructors
  106. </h3>
  107. <a id="Grpc_Core_AsyncServerStreamingCall_1__ctor_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.#ctor*"></a>
  108. <h4 id="Grpc_Core_AsyncServerStreamingCall_1__ctor_Grpc_Core_IAsyncStreamReader__0__Task_Grpc_Core_Metadata__Func_Grpc_Core_Status__Func_Grpc_Core_Metadata__Action_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.#ctor(Grpc.Core.IAsyncStreamReader{`0},Task{Grpc.Core.Metadata},Func{Grpc.Core.Status},Func{Grpc.Core.Metadata},Action)">AsyncServerStreamingCall(IAsyncStreamReader&lt;TResponse&gt;, Task&lt;Metadata&gt;, Func&lt;Status&gt;, Func&lt;Metadata&gt;, Action)</h4>
  109. <div class="markdown level1 summary"><p>Creates a new AsyncDuplexStreamingCall object with the specified properties.</p>
  110. </div>
  111. <div class="markdown level1 conceptual"></div>
  112. <h5 class="decalaration">Declaration</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public AsyncServerStreamingCall(IAsyncStreamReader&lt;TResponse&gt; responseStream, Task&lt;Metadata&gt; responseHeadersAsync, Func&lt;Status&gt; getStatusFunc, Func&lt;Metadata&gt; getTrailersFunc, Action disposeAction)</code></pre>
  115. </div>
  116. <h5 class="parameters">Parameters</h5>
  117. <table class="table table-bordered table-striped table-condensed">
  118. <thead>
  119. <tr>
  120. <th>Type</th>
  121. <th>Name</th>
  122. <th>Description</th>
  123. </tr>
  124. </thead>
  125. <tbody>
  126. <tr>
  127. <td><a class="xref" href="Grpc.Core.IAsyncStreamReader-1.html">IAsyncStreamReader</a>&lt;TResponse&gt;</td>
  128. <td><span class="parametername">responseStream</span></td>
  129. <td><p>Stream of response values.</p>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td><span class="xref">Task</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  134. <td><span class="parametername">responseHeadersAsync</span></td>
  135. <td><p>Response headers of the asynchronous call.</p>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td><span class="xref">Func</span>&lt;<a class="xref" href="Grpc.Core.Status.html">Status</a>&gt;</td>
  140. <td><span class="parametername">getStatusFunc</span></td>
  141. <td><p>Delegate returning the status of the call.</p>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td><span class="xref">Func</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  146. <td><span class="parametername">getTrailersFunc</span></td>
  147. <td><p>Delegate returning the trailing metadata of the call.</p>
  148. </td>
  149. </tr>
  150. <tr>
  151. <td><span class="xref">Action</span></td>
  152. <td><span class="parametername">disposeAction</span></td>
  153. <td><p>Delegate to invoke when Dispose is called on the call object.</p>
  154. </td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <h3 id="properties">Properties
  159. </h3>
  160. <a id="Grpc_Core_AsyncServerStreamingCall_1_ResponseHeadersAsync_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.ResponseHeadersAsync*"></a>
  161. <h4 id="Grpc_Core_AsyncServerStreamingCall_1_ResponseHeadersAsync" data-uid="Grpc.Core.AsyncServerStreamingCall`1.ResponseHeadersAsync">ResponseHeadersAsync</h4>
  162. <div class="markdown level1 summary"><p>Asynchronous access to response headers.</p>
  163. </div>
  164. <div class="markdown level1 conceptual"></div>
  165. <h5 class="decalaration">Declaration</h5>
  166. <div class="codewrapper">
  167. <pre><code class="lang-csharp hljs">public Task&lt;Metadata&gt; ResponseHeadersAsync { get; }</code></pre>
  168. </div>
  169. <h5 class="propertyValue">Property Value</h5>
  170. <table class="table table-bordered table-striped table-condensed">
  171. <thead>
  172. <tr>
  173. <th>Type</th>
  174. <th>Description</th>
  175. </tr>
  176. </thead>
  177. <tbody>
  178. <tr>
  179. <td><span class="xref">Task</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  180. <td></td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <a id="Grpc_Core_AsyncServerStreamingCall_1_ResponseStream_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.ResponseStream*"></a>
  185. <h4 id="Grpc_Core_AsyncServerStreamingCall_1_ResponseStream" data-uid="Grpc.Core.AsyncServerStreamingCall`1.ResponseStream">ResponseStream</h4>
  186. <div class="markdown level1 summary"><p>Async stream to read streaming responses.</p>
  187. </div>
  188. <div class="markdown level1 conceptual"></div>
  189. <h5 class="decalaration">Declaration</h5>
  190. <div class="codewrapper">
  191. <pre><code class="lang-csharp hljs">public IAsyncStreamReader&lt;TResponse&gt; ResponseStream { get; }</code></pre>
  192. </div>
  193. <h5 class="propertyValue">Property Value</h5>
  194. <table class="table table-bordered table-striped table-condensed">
  195. <thead>
  196. <tr>
  197. <th>Type</th>
  198. <th>Description</th>
  199. </tr>
  200. </thead>
  201. <tbody>
  202. <tr>
  203. <td><a class="xref" href="Grpc.Core.IAsyncStreamReader-1.html">IAsyncStreamReader</a>&lt;TResponse&gt;</td>
  204. <td></td>
  205. </tr>
  206. </tbody>
  207. </table>
  208. <h3 id="methods">Methods
  209. </h3>
  210. <a id="Grpc_Core_AsyncServerStreamingCall_1_Dispose_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.Dispose*"></a>
  211. <h4 id="Grpc_Core_AsyncServerStreamingCall_1_Dispose" data-uid="Grpc.Core.AsyncServerStreamingCall`1.Dispose">Dispose()</h4>
  212. <div class="markdown level1 summary"><p>Provides means to cleanup after the call.
  213. If the call has already finished normally (response stream has been fully read), doesn&apos;t do anything.
  214. Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call.
  215. As a result, all resources being used by the call should be released eventually.</p>
  216. </div>
  217. <div class="markdown level1 conceptual"></div>
  218. <h5 class="decalaration">Declaration</h5>
  219. <div class="codewrapper">
  220. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  221. </div>
  222. <h5 id="Grpc_Core_AsyncServerStreamingCall_1_Dispose_remarks">Remarks</h5>
  223. <div class="markdown level1 remarks"><p>Normally, there is no need for you to dispose the call unless you want to utilize the
  224. &quot;Cancel&quot; semantics of invoking <code>Dispose</code>.</p>
  225. </div>
  226. <a id="Grpc_Core_AsyncServerStreamingCall_1_GetStatus_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.GetStatus*"></a>
  227. <h4 id="Grpc_Core_AsyncServerStreamingCall_1_GetStatus" data-uid="Grpc.Core.AsyncServerStreamingCall`1.GetStatus">GetStatus()</h4>
  228. <div class="markdown level1 summary"><p>Gets the call status if the call has already finished.
  229. Throws InvalidOperationException otherwise.</p>
  230. </div>
  231. <div class="markdown level1 conceptual"></div>
  232. <h5 class="decalaration">Declaration</h5>
  233. <div class="codewrapper">
  234. <pre><code class="lang-csharp hljs">public Status GetStatus()</code></pre>
  235. </div>
  236. <h5 class="returns">Returns</h5>
  237. <table class="table table-bordered table-striped table-condensed">
  238. <thead>
  239. <tr>
  240. <th>Type</th>
  241. <th>Description</th>
  242. </tr>
  243. </thead>
  244. <tbody>
  245. <tr>
  246. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  247. <td></td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. <a id="Grpc_Core_AsyncServerStreamingCall_1_GetTrailers_" data-uid="Grpc.Core.AsyncServerStreamingCall`1.GetTrailers*"></a>
  252. <h4 id="Grpc_Core_AsyncServerStreamingCall_1_GetTrailers" data-uid="Grpc.Core.AsyncServerStreamingCall`1.GetTrailers">GetTrailers()</h4>
  253. <div class="markdown level1 summary"><p>Gets the call trailing metadata if the call has already finished.
  254. Throws InvalidOperationException otherwise.</p>
  255. </div>
  256. <div class="markdown level1 conceptual"></div>
  257. <h5 class="decalaration">Declaration</h5>
  258. <div class="codewrapper">
  259. <pre><code class="lang-csharp hljs">public Metadata GetTrailers()</code></pre>
  260. </div>
  261. <h5 class="returns">Returns</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  272. <td></td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. </article>
  277. </div>
  278. <div class="hidden-sm col-md-2" role="complementary">
  279. <div class="sideaffix">
  280. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  281. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  282. </nav>
  283. </div>
  284. </div>
  285. </div>
  286. </div>
  287. <footer>
  288. <div class="grad-bottom"></div>
  289. <div class="footer">
  290. <div class="container">
  291. <span class="pull-right">
  292. <a href="#top">Back to top</a>
  293. </span>
  294. <span>Generated by <strong>DocFX</strong></span>
  295. </div>
  296. </div>
  297. </footer>
  298. </div>
  299. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  300. <script type="text/javascript" src="../styles/docfx.js"></script>
  301. <script type="text/javascript" src="../styles/main.js"></script>
  302. </body>
  303. </html>