classgrpc_1_1internal_1_1_async_writer_interface.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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::internal::AsyncWriterInterface&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="namespacegrpc_1_1internal.html">internal</a></li><li class="navelem"><a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">AsyncWriterInterface</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::internal::AsyncWriterInterface&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>An interface that can be fed a sequence of messages of type <em>W</em>.
  74. <a href="classgrpc_1_1internal_1_1_async_writer_interface.html#details">More...</a></p>
  75. <p><code>#include &lt;<a class="el" href="grpcpp_2impl_2codegen_2async__stream_8h_source.html">async_stream.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:a8ad846091252c112c4db0b41965e5a4c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html#a8ad846091252c112c4db0b41965e5a4c">~AsyncWriterInterface</a> ()</td></tr>
  80. <tr class="separator:a8ad846091252c112c4db0b41965e5a4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:aa61e21fdfef0a4fb34f595bef767e6a8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html#aa61e21fdfef0a4fb34f595bef767e6a8">Write</a> (const W &amp;msg, void *tag)=0</td></tr>
  82. <tr class="memdesc:aa61e21fdfef0a4fb34f595bef767e6a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> with identifying tag <em>tag</em>. <a href="classgrpc_1_1internal_1_1_async_writer_interface.html#aa61e21fdfef0a4fb34f595bef767e6a8">More...</a><br /></td></tr>
  83. <tr class="separator:aa61e21fdfef0a4fb34f595bef767e6a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:a9fef3a3ceb6be3a140ef4a8ad33c6c75"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html#a9fef3a3ceb6be3a140ef4a8ad33c6c75">Write</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag)=0</td></tr>
  85. <tr class="memdesc:a9fef3a3ceb6be3a140ef4a8ad33c6c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> using <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em> with identifying tag <em>tag</em>. <a href="classgrpc_1_1internal_1_1_async_writer_interface.html#a9fef3a3ceb6be3a140ef4a8ad33c6c75">More...</a><br /></td></tr>
  86. <tr class="separator:a9fef3a3ceb6be3a140ef4a8ad33c6c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:a8dbc8f388cb8e79f587b821fd7d64ce7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html#a8dbc8f388cb8e79f587b821fd7d64ce7">WriteLast</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag)</td></tr>
  88. <tr class="memdesc:a8dbc8f388cb8e79f587b821fd7d64ce7"><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 <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em> with identifying tag <em>tag</em>. <a href="classgrpc_1_1internal_1_1_async_writer_interface.html#a8dbc8f388cb8e79f587b821fd7d64ce7">More...</a><br /></td></tr>
  89. <tr class="separator:a8dbc8f388cb8e79f587b821fd7d64ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. </table>
  91. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  92. <div class="textblock"><h3>template&lt;class W&gt;<br />
  93. class grpc::internal::AsyncWriterInterface&lt; W &gt;</h3>
  94. <p>An interface that can be fed a sequence of messages of type <em>W</em>. </p>
  95. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  96. <a id="a8ad846091252c112c4db0b41965e5a4c"></a>
  97. <h2 class="memtitle"><span class="permalink"><a href="#a8ad846091252c112c4db0b41965e5a4c">&#9670;&nbsp;</a></span>~AsyncWriterInterface()</h2>
  98. <div class="memitem">
  99. <div class="memproto">
  100. <div class="memtemplate">
  101. template&lt;class W &gt; </div>
  102. <table class="mlabels">
  103. <tr>
  104. <td class="mlabels-left">
  105. <table class="memname">
  106. <tr>
  107. <td class="memname">virtual <a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">grpc::internal::AsyncWriterInterface</a>&lt; W &gt;::~<a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">AsyncWriterInterface</a> </td>
  108. <td>(</td>
  109. <td class="paramname"></td><td>)</td>
  110. <td></td>
  111. </tr>
  112. </table>
  113. </td>
  114. <td class="mlabels-right">
  115. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  116. </tr>
  117. </table>
  118. </div><div class="memdoc">
  119. </div>
  120. </div>
  121. <h2 class="groupheader">Member Function Documentation</h2>
  122. <a id="a9fef3a3ceb6be3a140ef4a8ad33c6c75"></a>
  123. <h2 class="memtitle"><span class="permalink"><a href="#a9fef3a3ceb6be3a140ef4a8ad33c6c75">&#9670;&nbsp;</a></span>Write() <span class="overload">[1/2]</span></h2>
  124. <div class="memitem">
  125. <div class="memproto">
  126. <div class="memtemplate">
  127. template&lt;class W &gt; </div>
  128. <table class="mlabels">
  129. <tr>
  130. <td class="mlabels-left">
  131. <table class="memname">
  132. <tr>
  133. <td class="memname">virtual void <a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">grpc::internal::AsyncWriterInterface</a>&lt; W &gt;::Write </td>
  134. <td>(</td>
  135. <td class="paramtype">const W &amp;&#160;</td>
  136. <td class="paramname"><em>msg</em>, </td>
  137. </tr>
  138. <tr>
  139. <td class="paramkey"></td>
  140. <td></td>
  141. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  142. <td class="paramname"><em>options</em>, </td>
  143. </tr>
  144. <tr>
  145. <td class="paramkey"></td>
  146. <td></td>
  147. <td class="paramtype">void *&#160;</td>
  148. <td class="paramname"><em>tag</em>&#160;</td>
  149. </tr>
  150. <tr>
  151. <td></td>
  152. <td>)</td>
  153. <td></td><td></td>
  154. </tr>
  155. </table>
  156. </td>
  157. <td class="mlabels-right">
  158. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  159. </tr>
  160. </table>
  161. </div><div class="memdoc">
  162. <p>Request the writing of <em>msg</em> using <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em> with identifying tag <em>tag</em>. </p>
  163. <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. <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em> is used to set the write options of this message. This is thread-safe with respect to <em><a class="el" href="classgrpc_1_1internal_1_1_async_reader_interface.html#adf87c602036d69158950b7299d0aae70" title="Read a message of type R into msg.">AsyncReaderInterface::Read</a></em> </p>
  164. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  165. <dl class="params"><dt>Parameters</dt><dd>
  166. <table class="params">
  167. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  168. <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> to be used to write this message. </td></tr>
  169. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  170. </table>
  171. </dd>
  172. </dl>
  173. <p>Implemented in <a class="el" href="classgrpc_1_1_server_async_reader_writer.html#a055172e5de82fe91aebf83aefb7dfa62">grpc::ServerAsyncReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc_1_1_server_async_writer.html#a4ef42894ef7bc69f6b00fec798b6cf1d">grpc::ServerAsyncWriter&lt; W &gt;</a>, <a class="el" href="classgrpc_1_1_client_async_reader_writer.html#a65e446f92d97e2e6bb79f420d485c683">grpc::ClientAsyncReaderWriter&lt; W, R &gt;</a>, and <a class="el" href="classgrpc_1_1_client_async_writer.html#a1991aca74e32523932432c6486b91a09">grpc::ClientAsyncWriter&lt; W &gt;</a>.</p>
  174. </div>
  175. </div>
  176. <a id="aa61e21fdfef0a4fb34f595bef767e6a8"></a>
  177. <h2 class="memtitle"><span class="permalink"><a href="#aa61e21fdfef0a4fb34f595bef767e6a8">&#9670;&nbsp;</a></span>Write() <span class="overload">[2/2]</span></h2>
  178. <div class="memitem">
  179. <div class="memproto">
  180. <div class="memtemplate">
  181. template&lt;class W &gt; </div>
  182. <table class="mlabels">
  183. <tr>
  184. <td class="mlabels-left">
  185. <table class="memname">
  186. <tr>
  187. <td class="memname">virtual void <a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">grpc::internal::AsyncWriterInterface</a>&lt; W &gt;::Write </td>
  188. <td>(</td>
  189. <td class="paramtype">const W &amp;&#160;</td>
  190. <td class="paramname"><em>msg</em>, </td>
  191. </tr>
  192. <tr>
  193. <td class="paramkey"></td>
  194. <td></td>
  195. <td class="paramtype">void *&#160;</td>
  196. <td class="paramname"><em>tag</em>&#160;</td>
  197. </tr>
  198. <tr>
  199. <td></td>
  200. <td>)</td>
  201. <td></td><td></td>
  202. </tr>
  203. </table>
  204. </td>
  205. <td class="mlabels-right">
  206. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  207. </tr>
  208. </table>
  209. </div><div class="memdoc">
  210. <p>Request the writing of <em>msg</em> with identifying tag <em>tag</em>. </p>
  211. <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><a class="el" href="classgrpc_1_1internal_1_1_async_reader_interface.html#adf87c602036d69158950b7299d0aae70" title="Read a message of type R into msg.">AsyncReaderInterface::Read</a></em> </p>
  212. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  213. <dl class="params"><dt>Parameters</dt><dd>
  214. <table class="params">
  215. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  216. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  217. </table>
  218. </dd>
  219. </dl>
  220. <p>Implemented in <a class="el" href="classgrpc_1_1_server_async_reader_writer.html#a816fd9065473a24d4ab613ee2ecb19e1">grpc::ServerAsyncReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc_1_1_server_async_writer.html#a467f70c7460ceb7738fb938b3bf93c85">grpc::ServerAsyncWriter&lt; W &gt;</a>, <a class="el" href="classgrpc_1_1_client_async_reader_writer.html#a07bcc3a0737c3bee3ef50def89af5fc7">grpc::ClientAsyncReaderWriter&lt; W, R &gt;</a>, and <a class="el" href="classgrpc_1_1_client_async_writer.html#a0e981b6dcce663e655edf305573f2f30">grpc::ClientAsyncWriter&lt; W &gt;</a>.</p>
  221. </div>
  222. </div>
  223. <a id="a8dbc8f388cb8e79f587b821fd7d64ce7"></a>
  224. <h2 class="memtitle"><span class="permalink"><a href="#a8dbc8f388cb8e79f587b821fd7d64ce7">&#9670;&nbsp;</a></span>WriteLast()</h2>
  225. <div class="memitem">
  226. <div class="memproto">
  227. <div class="memtemplate">
  228. template&lt;class W &gt; </div>
  229. <table class="mlabels">
  230. <tr>
  231. <td class="mlabels-left">
  232. <table class="memname">
  233. <tr>
  234. <td class="memname">void <a class="el" href="classgrpc_1_1internal_1_1_async_writer_interface.html">grpc::internal::AsyncWriterInterface</a>&lt; W &gt;::WriteLast </td>
  235. <td>(</td>
  236. <td class="paramtype">const W &amp;&#160;</td>
  237. <td class="paramname"><em>msg</em>, </td>
  238. </tr>
  239. <tr>
  240. <td class="paramkey"></td>
  241. <td></td>
  242. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  243. <td class="paramname"><em>options</em>, </td>
  244. </tr>
  245. <tr>
  246. <td class="paramkey"></td>
  247. <td></td>
  248. <td class="paramtype">void *&#160;</td>
  249. <td class="paramname"><em>tag</em>&#160;</td>
  250. </tr>
  251. <tr>
  252. <td></td>
  253. <td>)</td>
  254. <td></td><td></td>
  255. </tr>
  256. </table>
  257. </td>
  258. <td class="mlabels-right">
  259. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  260. </tr>
  261. </table>
  262. </div><div class="memdoc">
  263. <p>Request the writing of <em>msg</em> and coalesce it with the writing of trailing metadata, using <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em> with identifying tag <em>tag</em>. </p>
  264. <p>For client, WriteLast is equivalent of performing Write and WritesDone in a single step. For server, WriteLast buffers the <em>msg</em>. The writing of <em>msg</em> is held until Finish is called, where <em>msg</em> and trailing metadata are coalesced and write is initiated. Note that WriteLast can only buffer <em>msg</em> up to the flow control window size. If <em>msg</em> size is larger than the window size, it will be sent on wire without buffering.</p>
  265. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  266. <dl class="params"><dt>Parameters</dt><dd>
  267. <table class="params">
  268. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  269. <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> to be used to write this message. </td></tr>
  270. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  271. </table>
  272. </dd>
  273. </dl>
  274. </div>
  275. </div>
  276. <hr/>The documentation for this class was generated from the following file:<ul>
  277. <li>include/grpcpp/impl/codegen/<a class="el" href="grpcpp_2impl_2codegen_2async__stream_8h_source.html">async_stream.h</a></li>
  278. </ul>
  279. </div><!-- contents -->
  280. <!-- start footer part -->
  281. <hr class="footer"/><address class="footer"><small>
  282. Generated on Wed Mar 3 2021 19:17:25 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  283. <img class="footer" src="doxygen.png" alt="doxygen"/>
  284. </a> 1.8.17
  285. </small></address>
  286. </body>
  287. </html>