classgrpc__impl_1_1_server_async_writer.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC C++: grpc_impl::ServerAsyncWriter&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.23.0</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div id="nav-path" class="navpath">
  59. <ul>
  60. <li class="navelem"><a class="el" href="namespacegrpc__impl.html">grpc_impl</a></li><li class="navelem"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html">ServerAsyncWriter</a></li> </ul>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="summary">
  65. <a href="#pub-methods">Public Member Functions</a> </div>
  66. <div class="headertitle">
  67. <div class="title">grpc_impl::ServerAsyncWriter&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type <em>W</em>.
  71. <a href="classgrpc__impl_1_1_server_async_writer.html#details">More...</a></p>
  72. <p><code>#include &lt;<a class="el" href="impl_2codegen_2async__stream__impl_8h_source.html">async_stream_impl.h</a>&gt;</code></p>
  73. <table class="memberdecls">
  74. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  75. Public Member Functions</h2></td></tr>
  76. <tr class="memitem:afe3147c83e047b4c4662fd5c289b9df2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#afe3147c83e047b4c4662fd5c289b9df2">ServerAsyncWriter</a> (::<a class="el" href="classgrpc__impl_1_1_server_context.html">grpc_impl::ServerContext</a> *ctx)</td></tr>
  77. <tr class="separator:afe3147c83e047b4c4662fd5c289b9df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:ad286d4e160c63568154af47034e1880e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#ad286d4e160c63568154af47034e1880e">SendInitialMetadata</a> (void *tag) override</td></tr>
  79. <tr class="memdesc:ad286d4e160c63568154af47034e1880e"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. <a href="#ad286d4e160c63568154af47034e1880e">More...</a><br /></td></tr>
  80. <tr class="separator:ad286d4e160c63568154af47034e1880e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a05daf326ddaeee486dcd771b69329b98"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a05daf326ddaeee486dcd771b69329b98">Write</a> (const W &amp;msg, void *tag) override</td></tr>
  82. <tr class="memdesc:a05daf326ddaeee486dcd771b69329b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> with identifying tag <em>tag</em>. <a href="#a05daf326ddaeee486dcd771b69329b98">More...</a><br /></td></tr>
  83. <tr class="separator:a05daf326ddaeee486dcd771b69329b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:afbd407cad4ebfbfe199fad243e130c9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#afbd407cad4ebfbfe199fad243e130c9e">Write</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag) override</td></tr>
  85. <tr class="memdesc:afbd407cad4ebfbfe199fad243e130c9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> using WriteOptions <em>options</em> with identifying tag <em>tag</em>. <a href="#afbd407cad4ebfbfe199fad243e130c9e">More...</a><br /></td></tr>
  86. <tr class="separator:afbd407cad4ebfbfe199fad243e130c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:a85bb275404d45a0a3bfcd53e7b44593e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a85bb275404d45a0a3bfcd53e7b44593e">WriteAndFinish</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag) override</td></tr>
  88. <tr class="memdesc:a85bb275404d45a0a3bfcd53e7b44593e"><td class="mdescLeft">&#160;</td><td class="mdescRight">See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912" title="Request the writing of msg and coalesce it with trailing metadata which contains status, using WriteOptions options with identifying tag tag. ">ServerAsyncWriterInterface.WriteAndFinish</a></em> method for semantics. <a href="#a85bb275404d45a0a3bfcd53e7b44593e">More...</a><br /></td></tr>
  89. <tr class="separator:a85bb275404d45a0a3bfcd53e7b44593e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a92ff8de396fb2b647e801b0d0f474c2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a92ff8de396fb2b647e801b0d0f474c2b">Finish</a> (const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag) override</td></tr>
  91. <tr class="memdesc:a92ff8de396fb2b647e801b0d0f474c2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd" title="Indicate that the stream is to be finished with a certain status code. ">ServerAsyncWriterInterface.Finish</a></em> method for semantics. <a href="#a92ff8de396fb2b647e801b0d0f474c2b">More...</a><br /></td></tr>
  92. <tr class="separator:a92ff8de396fb2b647e801b0d0f474c2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <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>
  94. <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>
  95. <tr class="separator:aeace2295f3792ce24975361c300d641a inherit pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="inherit_header pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a></td></tr>
  97. <tr class="memitem:abb8fa894b94e09e9a2b6ca261a20ec8b inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#abb8fa894b94e09e9a2b6ca261a20ec8b">~AsyncWriterInterface</a> ()</td></tr>
  98. <tr class="separator:abb8fa894b94e09e9a2b6ca261a20ec8b inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a05ab1b1965def7cec0324fe27b0fa67f">WriteLast</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag)</td></tr>
  100. <tr class="memdesc:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> and coalesce it with the writing of trailing metadata, using WriteOptions <em>options</em> with identifying tag <em>tag</em>. <a href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a05ab1b1965def7cec0324fe27b0fa67f">More...</a><br /></td></tr>
  101. <tr class="separator:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. </table>
  103. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  104. <div class="textblock"><h3>template&lt;class W&gt;<br />
  105. class grpc_impl::ServerAsyncWriter&lt; W &gt;</h3>
  106. <p>Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type <em>W</em>. </p>
  107. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  108. <a id="afe3147c83e047b4c4662fd5c289b9df2"></a>
  109. <h2 class="memtitle"><span class="permalink"><a href="#afe3147c83e047b4c4662fd5c289b9df2">&#9670;&nbsp;</a></span>ServerAsyncWriter()</h2>
  110. <div class="memitem">
  111. <div class="memproto">
  112. <div class="memtemplate">
  113. template&lt;class W &gt; </div>
  114. <table class="mlabels">
  115. <tr>
  116. <td class="mlabels-left">
  117. <table class="memname">
  118. <tr>
  119. <td class="memname"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::<a class="el" href="classgrpc__impl_1_1_server_async_writer.html">ServerAsyncWriter</a> </td>
  120. <td>(</td>
  121. <td class="paramtype">::<a class="el" href="classgrpc__impl_1_1_server_context.html">grpc_impl::ServerContext</a> *&#160;</td>
  122. <td class="paramname"><em>ctx</em></td><td>)</td>
  123. <td></td>
  124. </tr>
  125. </table>
  126. </td>
  127. <td class="mlabels-right">
  128. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
  129. </tr>
  130. </table>
  131. </div><div class="memdoc">
  132. </div>
  133. </div>
  134. <h2 class="groupheader">Member Function Documentation</h2>
  135. <a id="a92ff8de396fb2b647e801b0d0f474c2b"></a>
  136. <h2 class="memtitle"><span class="permalink"><a href="#a92ff8de396fb2b647e801b0d0f474c2b">&#9670;&nbsp;</a></span>Finish()</h2>
  137. <div class="memitem">
  138. <div class="memproto">
  139. <div class="memtemplate">
  140. template&lt;class W &gt; </div>
  141. <table class="mlabels">
  142. <tr>
  143. <td class="mlabels-left">
  144. <table class="memname">
  145. <tr>
  146. <td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Finish </td>
  147. <td>(</td>
  148. <td class="paramtype">const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;&#160;</td>
  149. <td class="paramname"><em>status</em>, </td>
  150. </tr>
  151. <tr>
  152. <td class="paramkey"></td>
  153. <td></td>
  154. <td class="paramtype">void *&#160;</td>
  155. <td class="paramname"><em>tag</em>&#160;</td>
  156. </tr>
  157. <tr>
  158. <td></td>
  159. <td>)</td>
  160. <td></td><td></td>
  161. </tr>
  162. </table>
  163. </td>
  164. <td class="mlabels-right">
  165. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  166. </tr>
  167. </table>
  168. </div><div class="memdoc">
  169. <p>See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd" title="Indicate that the stream is to be finished with a certain status code. ">ServerAsyncWriterInterface.Finish</a></em> method for semantics. </p>
  170. <p>Implicit input parameter:</p><ul>
  171. <li>the <em><a class="el" href="classgrpc__impl_1_1_server_context.html" title="A ServerContext allows the person implementing a service handler to: ">ServerContext</a></em> associated with this call is used for sending trailing (and initial if not already sent) metadata to the client.</li>
  172. </ul>
  173. <p>Note: there are no restrictions are the code of <em>status</em>,it may be non-OK</p>
  174. <p>gRPC doesn't take ownership or a reference to <em>status</em>, so it is safe to to deallocate once Finish returns. </p>
  175. <p>Implements <a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd">grpc_impl::ServerAsyncWriterInterface&lt; W &gt;</a>.</p>
  176. </div>
  177. </div>
  178. <a id="ad286d4e160c63568154af47034e1880e"></a>
  179. <h2 class="memtitle"><span class="permalink"><a href="#ad286d4e160c63568154af47034e1880e">&#9670;&nbsp;</a></span>SendInitialMetadata()</h2>
  180. <div class="memitem">
  181. <div class="memproto">
  182. <div class="memtemplate">
  183. template&lt;class W &gt; </div>
  184. <table class="mlabels">
  185. <tr>
  186. <td class="mlabels-left">
  187. <table class="memname">
  188. <tr>
  189. <td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::SendInitialMetadata </td>
  190. <td>(</td>
  191. <td class="paramtype">void *&#160;</td>
  192. <td class="paramname"><em>tag</em></td><td>)</td>
  193. <td></td>
  194. </tr>
  195. </table>
  196. </td>
  197. <td class="mlabels-right">
  198. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  199. </tr>
  200. </table>
  201. </div><div class="memdoc">
  202. <p>See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. </p>
  203. <p>Implicit input parameter:</p><ul>
  204. <li>The initial metadata that will be sent to the client from this op will be taken from the <em><a class="el" href="classgrpc__impl_1_1_server_context.html" title="A ServerContext allows the person implementing a service handler to: ">ServerContext</a></em> associated with the call.</li>
  205. </ul>
  206. <dl class="params"><dt>Parameters</dt><dd>
  207. <table class="params">
  208. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
  209. </table>
  210. </dd>
  211. </dl>
  212. <p>Implements <a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html#ac55759faf2283db8bf716183881efe01">grpc::internal::ServerAsyncStreamingInterface</a>.</p>
  213. </div>
  214. </div>
  215. <a id="a05daf326ddaeee486dcd771b69329b98"></a>
  216. <h2 class="memtitle"><span class="permalink"><a href="#a05daf326ddaeee486dcd771b69329b98">&#9670;&nbsp;</a></span>Write() <span class="overload">[1/2]</span></h2>
  217. <div class="memitem">
  218. <div class="memproto">
  219. <div class="memtemplate">
  220. template&lt;class W &gt; </div>
  221. <table class="mlabels">
  222. <tr>
  223. <td class="mlabels-left">
  224. <table class="memname">
  225. <tr>
  226. <td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Write </td>
  227. <td>(</td>
  228. <td class="paramtype">const W &amp;&#160;</td>
  229. <td class="paramname"><em>msg</em>, </td>
  230. </tr>
  231. <tr>
  232. <td class="paramkey"></td>
  233. <td></td>
  234. <td class="paramtype">void *&#160;</td>
  235. <td class="paramname"><em>tag</em>&#160;</td>
  236. </tr>
  237. <tr>
  238. <td></td>
  239. <td>)</td>
  240. <td></td><td></td>
  241. </tr>
  242. </table>
  243. </td>
  244. <td class="mlabels-right">
  245. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  246. </tr>
  247. </table>
  248. </div><div class="memdoc">
  249. <p>Request the writing of <em>msg</em> with identifying tag <em>tag</em>. </p>
  250. <p>Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive <em>tag</em> from the completion queue BEFORE calling Write again. This is thread-safe with respect to <em>AsyncReaderInterface::Read</em> </p>
  251. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  252. <dl class="params"><dt>Parameters</dt><dd>
  253. <table class="params">
  254. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  255. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  256. </table>
  257. </dd>
  258. </dl>
  259. <p>Implements <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a9c4e4ce91569478b6656992a35c5ece1">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a>.</p>
  260. </div>
  261. </div>
  262. <a id="afbd407cad4ebfbfe199fad243e130c9e"></a>
  263. <h2 class="memtitle"><span class="permalink"><a href="#afbd407cad4ebfbfe199fad243e130c9e">&#9670;&nbsp;</a></span>Write() <span class="overload">[2/2]</span></h2>
  264. <div class="memitem">
  265. <div class="memproto">
  266. <div class="memtemplate">
  267. template&lt;class W &gt; </div>
  268. <table class="mlabels">
  269. <tr>
  270. <td class="mlabels-left">
  271. <table class="memname">
  272. <tr>
  273. <td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Write </td>
  274. <td>(</td>
  275. <td class="paramtype">const W &amp;&#160;</td>
  276. <td class="paramname"><em>msg</em>, </td>
  277. </tr>
  278. <tr>
  279. <td class="paramkey"></td>
  280. <td></td>
  281. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  282. <td class="paramname"><em>options</em>, </td>
  283. </tr>
  284. <tr>
  285. <td class="paramkey"></td>
  286. <td></td>
  287. <td class="paramtype">void *&#160;</td>
  288. <td class="paramname"><em>tag</em>&#160;</td>
  289. </tr>
  290. <tr>
  291. <td></td>
  292. <td>)</td>
  293. <td></td><td></td>
  294. </tr>
  295. </table>
  296. </td>
  297. <td class="mlabels-right">
  298. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  299. </tr>
  300. </table>
  301. </div><div class="memdoc">
  302. <p>Request the writing of <em>msg</em> using WriteOptions <em>options</em> with identifying tag <em>tag</em>. </p>
  303. <p>Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive <em>tag</em> from the completion queue BEFORE calling Write again. WriteOptions <em>options</em> is used to set the write options of this message. This is thread-safe with respect to <em>AsyncReaderInterface::Read</em> </p>
  304. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  305. <dl class="params"><dt>Parameters</dt><dd>
  306. <table class="params">
  307. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  308. <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The WriteOptions to be used to write this message. </td></tr>
  309. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  310. </table>
  311. </dd>
  312. </dl>
  313. <p>Implements <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a8b008c0685622ae659f8a57fb508bb5b">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a>.</p>
  314. </div>
  315. </div>
  316. <a id="a85bb275404d45a0a3bfcd53e7b44593e"></a>
  317. <h2 class="memtitle"><span class="permalink"><a href="#a85bb275404d45a0a3bfcd53e7b44593e">&#9670;&nbsp;</a></span>WriteAndFinish()</h2>
  318. <div class="memitem">
  319. <div class="memproto">
  320. <div class="memtemplate">
  321. template&lt;class W &gt; </div>
  322. <table class="mlabels">
  323. <tr>
  324. <td class="mlabels-left">
  325. <table class="memname">
  326. <tr>
  327. <td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::WriteAndFinish </td>
  328. <td>(</td>
  329. <td class="paramtype">const W &amp;&#160;</td>
  330. <td class="paramname"><em>msg</em>, </td>
  331. </tr>
  332. <tr>
  333. <td class="paramkey"></td>
  334. <td></td>
  335. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  336. <td class="paramname"><em>options</em>, </td>
  337. </tr>
  338. <tr>
  339. <td class="paramkey"></td>
  340. <td></td>
  341. <td class="paramtype">const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;&#160;</td>
  342. <td class="paramname"><em>status</em>, </td>
  343. </tr>
  344. <tr>
  345. <td class="paramkey"></td>
  346. <td></td>
  347. <td class="paramtype">void *&#160;</td>
  348. <td class="paramname"><em>tag</em>&#160;</td>
  349. </tr>
  350. <tr>
  351. <td></td>
  352. <td>)</td>
  353. <td></td><td></td>
  354. </tr>
  355. </table>
  356. </td>
  357. <td class="mlabels-right">
  358. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
  359. </tr>
  360. </table>
  361. </div><div class="memdoc">
  362. <p>See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912" title="Request the writing of msg and coalesce it with trailing metadata which contains status, using WriteOptions options with identifying tag tag. ">ServerAsyncWriterInterface.WriteAndFinish</a></em> method for semantics. </p>
  363. <p>Implicit input parameter:</p><ul>
  364. <li>the <em><a class="el" href="classgrpc__impl_1_1_server_context.html" title="A ServerContext allows the person implementing a service handler to: ">ServerContext</a></em> associated with this call is used for sending trailing (and initial) metadata to the client.</li>
  365. </ul>
  366. <p>Note: <em>status</em> must have an OK code.</p>
  367. <p>gRPC doesn't take ownership or a reference to <em>msg</em> and <em>status</em>, so it is safe to deallocate once WriteAndFinish returns. </p>
  368. <p>Implements <a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912">grpc_impl::ServerAsyncWriterInterface&lt; W &gt;</a>.</p>
  369. </div>
  370. </div>
  371. <hr/>The documentation for this class was generated from the following file:<ul>
  372. <li>include/grpcpp/impl/codegen/<a class="el" href="impl_2codegen_2async__stream__impl_8h_source.html">async_stream_impl.h</a></li>
  373. </ul>
  374. </div><!-- contents -->
  375. <!-- start footer part -->
  376. <hr class="footer"/><address class="footer"><small>
  377. Generated on Mon Aug 19 2019 12:05:23 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  378. <img class="footer" src="doxygen.png" alt="doxygen"/>
  379. </a> 1.8.13
  380. </small></address>
  381. </body>
  382. </html>