classgrpc_1_1_server_async_response_writer.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC C++: grpc::ServerAsyncResponseWriter&lt; W &gt; Class Template Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC C++
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. <div id="nav-path" class="navpath">
  62. <ul>
  63. <li class="navelem"><a class="el" href="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_server_async_response_writer.html">ServerAsyncResponseWriter</a></li> </ul>
  64. </div>
  65. </div><!-- top -->
  66. <div class="header">
  67. <div class="summary">
  68. <a href="#pub-methods">Public Member Functions</a> </div>
  69. <div class="headertitle">
  70. <div class="title">grpc::ServerAsyncResponseWriter&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>Async server-side API for handling unary calls, where the single response message sent to the client is of type <em>W</em>.
  74. <a href="classgrpc_1_1_server_async_response_writer.html#details">More...</a></p>
  75. <p><code>#include &lt;<a class="el" href="grpcpp_2impl_2codegen_2async__unary__call_8h_source.html">async_unary_call.h</a>&gt;</code></p>
  76. <table class="memberdecls">
  77. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  78. Public Member Functions</h2></td></tr>
  79. <tr class="memitem:a93eb3a2aa321c37af84d9c06eb7f9abd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#a93eb3a2aa321c37af84d9c06eb7f9abd">ServerAsyncResponseWriter</a> (::<a class="el" href="classgrpc_1_1_server_context.html">grpc::ServerContext</a> *ctx)</td></tr>
  80. <tr class="separator:a93eb3a2aa321c37af84d9c06eb7f9abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a451ba3cd9093168a6becd137b1720834"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">SendInitialMetadata</a> (void *tag) override</td></tr>
  82. <tr class="memdesc:a451ba3cd9093168a6becd137b1720834"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. <a href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">More...</a><br /></td></tr>
  83. <tr class="separator:a451ba3cd9093168a6becd137b1720834"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ab0788486b59d78038f176fd6eb400f9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#ab0788486b59d78038f176fd6eb400f9c">Finish</a> (const W &amp;msg, const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag)</td></tr>
  85. <tr class="memdesc:ab0788486b59d78038f176fd6eb400f9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call. <a href="classgrpc_1_1_server_async_response_writer.html#ab0788486b59d78038f176fd6eb400f9c">More...</a><br /></td></tr>
  86. <tr class="separator:ab0788486b59d78038f176fd6eb400f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ae632911731f347395150c24a02dc204f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#ae632911731f347395150c24a02dc204f">FinishWithError</a> (const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag)</td></tr>
  88. <tr class="memdesc:ae632911731f347395150c24a02dc204f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call. <a href="classgrpc_1_1_server_async_response_writer.html#ae632911731f347395150c24a02dc204f">More...</a><br /></td></tr>
  89. <tr class="separator:ae632911731f347395150c24a02dc204f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="inherit_header pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html">grpc::internal::ServerAsyncStreamingInterface</a></td></tr>
  91. <tr class="memitem:aeace2295f3792ce24975361c300d641a inherit pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html#aeace2295f3792ce24975361c300d641a">~ServerAsyncStreamingInterface</a> ()</td></tr>
  92. <tr class="separator:aeace2295f3792ce24975361c300d641a inherit pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table>
  94. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  95. <div class="textblock"><h3>template&lt;class W&gt;<br />
  96. class grpc::ServerAsyncResponseWriter&lt; W &gt;</h3>
  97. <p>Async server-side API for handling unary calls, where the single response message sent to the client is of type <em>W</em>. </p>
  98. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  99. <a id="a93eb3a2aa321c37af84d9c06eb7f9abd"></a>
  100. <h2 class="memtitle"><span class="permalink"><a href="#a93eb3a2aa321c37af84d9c06eb7f9abd">&#9670;&nbsp;</a></span>ServerAsyncResponseWriter()</h2>
  101. <div class="memitem">
  102. <div class="memproto">
  103. <div class="memtemplate">
  104. template&lt;class W &gt; </div>
  105. <table class="mlabels">
  106. <tr>
  107. <td class="mlabels-left">
  108. <table class="memname">
  109. <tr>
  110. <td class="memname"><a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>&lt; W &gt;::<a class="el" href="classgrpc_1_1_server_async_response_writer.html">ServerAsyncResponseWriter</a> </td>
  111. <td>(</td>
  112. <td class="paramtype">::<a class="el" href="classgrpc_1_1_server_context.html">grpc::ServerContext</a> *&#160;</td>
  113. <td class="paramname"><em>ctx</em></td><td>)</td>
  114. <td></td>
  115. </tr>
  116. </table>
  117. </td>
  118. <td class="mlabels-right">
  119. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
  120. </tr>
  121. </table>
  122. </div><div class="memdoc">
  123. </div>
  124. </div>
  125. <h2 class="groupheader">Member Function Documentation</h2>
  126. <a id="ab0788486b59d78038f176fd6eb400f9c"></a>
  127. <h2 class="memtitle"><span class="permalink"><a href="#ab0788486b59d78038f176fd6eb400f9c">&#9670;&nbsp;</a></span>Finish()</h2>
  128. <div class="memitem">
  129. <div class="memproto">
  130. <div class="memtemplate">
  131. template&lt;class W &gt; </div>
  132. <table class="mlabels">
  133. <tr>
  134. <td class="mlabels-left">
  135. <table class="memname">
  136. <tr>
  137. <td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>&lt; W &gt;::Finish </td>
  138. <td>(</td>
  139. <td class="paramtype">const W &amp;&#160;</td>
  140. <td class="paramname"><em>msg</em>, </td>
  141. </tr>
  142. <tr>
  143. <td class="paramkey"></td>
  144. <td></td>
  145. <td class="paramtype">const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;&#160;</td>
  146. <td class="paramname"><em>status</em>, </td>
  147. </tr>
  148. <tr>
  149. <td class="paramkey"></td>
  150. <td></td>
  151. <td class="paramtype">void *&#160;</td>
  152. <td class="paramname"><em>tag</em>&#160;</td>
  153. </tr>
  154. <tr>
  155. <td></td>
  156. <td>)</td>
  157. <td></td><td></td>
  158. </tr>
  159. </table>
  160. </td>
  161. <td class="mlabels-right">
  162. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  163. </tr>
  164. </table>
  165. </div><div class="memdoc">
  166. <p>Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call. </p>
  167. <p>Should not be used concurrently with other operations.</p>
  168. <dl class="params"><dt>Parameters</dt><dd>
  169. <table class="params">
  170. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
  171. <tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>To be sent to the client as the result of the call. </td></tr>
  172. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to be sent to the client.</td></tr>
  173. </table>
  174. </dd>
  175. </dl>
  176. <p>Side effect:</p><ul>
  177. <li>also sends initial metadata if not already sent (using the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with this call).</li>
  178. </ul>
  179. <p>Note: if <em>status</em> has a non-OK code, then <em>msg</em> will not be sent, and the client will receive only the status with possible trailing metadata. </p>
  180. </div>
  181. </div>
  182. <a id="ae632911731f347395150c24a02dc204f"></a>
  183. <h2 class="memtitle"><span class="permalink"><a href="#ae632911731f347395150c24a02dc204f">&#9670;&nbsp;</a></span>FinishWithError()</h2>
  184. <div class="memitem">
  185. <div class="memproto">
  186. <div class="memtemplate">
  187. template&lt;class W &gt; </div>
  188. <table class="mlabels">
  189. <tr>
  190. <td class="mlabels-left">
  191. <table class="memname">
  192. <tr>
  193. <td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>&lt; W &gt;::FinishWithError </td>
  194. <td>(</td>
  195. <td class="paramtype">const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;&#160;</td>
  196. <td class="paramname"><em>status</em>, </td>
  197. </tr>
  198. <tr>
  199. <td class="paramkey"></td>
  200. <td></td>
  201. <td class="paramtype">void *&#160;</td>
  202. <td class="paramname"><em>tag</em>&#160;</td>
  203. </tr>
  204. <tr>
  205. <td></td>
  206. <td>)</td>
  207. <td></td><td></td>
  208. </tr>
  209. </table>
  210. </td>
  211. <td class="mlabels-right">
  212. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  213. </tr>
  214. </table>
  215. </div><div class="memdoc">
  216. <p>Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call. </p>
  217. <p>Should not be used concurrently with other operations.</p>
  218. <dl class="params"><dt>Parameters</dt><dd>
  219. <table class="params">
  220. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
  221. <tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>To be sent to the client as the result of the call.<ul>
  222. <li>Note: <em>status</em> must have a non-OK code.</li>
  223. </ul>
  224. </td></tr>
  225. </table>
  226. </dd>
  227. </dl>
  228. <p>Side effect:</p><ul>
  229. <li>also sends initial metadata if not already sent (using the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with this call). </li>
  230. </ul>
  231. </div>
  232. </div>
  233. <a id="a451ba3cd9093168a6becd137b1720834"></a>
  234. <h2 class="memtitle"><span class="permalink"><a href="#a451ba3cd9093168a6becd137b1720834">&#9670;&nbsp;</a></span>SendInitialMetadata()</h2>
  235. <div class="memitem">
  236. <div class="memproto">
  237. <div class="memtemplate">
  238. template&lt;class W &gt; </div>
  239. <table class="mlabels">
  240. <tr>
  241. <td class="mlabels-left">
  242. <table class="memname">
  243. <tr>
  244. <td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>&lt; W &gt;::SendInitialMetadata </td>
  245. <td>(</td>
  246. <td class="paramtype">void *&#160;</td>
  247. <td class="paramname"><em>tag</em></td><td>)</td>
  248. <td></td>
  249. </tr>
  250. </table>
  251. </td>
  252. <td class="mlabels-right">
  253. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  254. </tr>
  255. </table>
  256. </div><div class="memdoc">
  257. <p>See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. </p>
  258. <p>Side effect: The initial metadata that will be sent to the client from this op will be taken from the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with the call.</p>
  259. <dl class="params"><dt>Parameters</dt><dd>
  260. <table class="params">
  261. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
  262. </table>
  263. </dd>
  264. </dl>
  265. <p>Implements <a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html#ac55759faf2283db8bf716183881efe01">grpc::internal::ServerAsyncStreamingInterface</a>.</p>
  266. </div>
  267. </div>
  268. <hr/>The documentation for this class was generated from the following file:<ul>
  269. <li>include/grpcpp/impl/codegen/<a class="el" href="grpcpp_2impl_2codegen_2async__unary__call_8h_source.html">async_unary_call.h</a></li>
  270. </ul>
  271. </div><!-- contents -->
  272. <!-- start footer part -->
  273. <hr class="footer"/><address class="footer"><small>
  274. Generated on Wed Mar 3 2021 19:17:24 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  275. <img class="footer" src="doxygen.png" alt="doxygen"/>
  276. </a> 1.8.17
  277. </small></address>
  278. </body>
  279. </html>