classgrpc__impl_1_1internal_1_1_async_writer_interface.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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::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.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="namespacegrpc__impl_1_1internal.html">internal</a></li><li class="navelem"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">AsyncWriterInterface</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::internal::AsyncWriterInterface&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>An interface that can be fed a sequence of messages of type <em>W</em>.
  71. <a href="classgrpc__impl_1_1internal_1_1_async_writer_interface.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:abb8fa894b94e09e9a2b6ca261a20ec8b"><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>
  77. <tr class="separator:abb8fa894b94e09e9a2b6ca261a20ec8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a9c4e4ce91569478b6656992a35c5ece1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a9c4e4ce91569478b6656992a35c5ece1">Write</a> (const W &amp;msg, void *tag)=0</td></tr>
  79. <tr class="memdesc:a9c4e4ce91569478b6656992a35c5ece1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> with identifying tag <em>tag</em>. <a href="#a9c4e4ce91569478b6656992a35c5ece1">More...</a><br /></td></tr>
  80. <tr class="separator:a9c4e4ce91569478b6656992a35c5ece1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a8b008c0685622ae659f8a57fb508bb5b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a8b008c0685622ae659f8a57fb508bb5b">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>
  82. <tr class="memdesc:a8b008c0685622ae659f8a57fb508bb5b"><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="#a8b008c0685622ae659f8a57fb508bb5b">More...</a><br /></td></tr>
  83. <tr class="separator:a8b008c0685622ae659f8a57fb508bb5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:a05ab1b1965def7cec0324fe27b0fa67f"><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>
  85. <tr class="memdesc:a05ab1b1965def7cec0324fe27b0fa67f"><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="#a05ab1b1965def7cec0324fe27b0fa67f">More...</a><br /></td></tr>
  86. <tr class="separator:a05ab1b1965def7cec0324fe27b0fa67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. </table>
  88. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  89. <div class="textblock"><h3>template&lt;class W&gt;<br />
  90. class grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</h3>
  91. <p>An interface that can be fed a sequence of messages of type <em>W</em>. </p>
  92. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  93. <a id="abb8fa894b94e09e9a2b6ca261a20ec8b"></a>
  94. <h2 class="memtitle"><span class="permalink"><a href="#abb8fa894b94e09e9a2b6ca261a20ec8b">&#9670;&nbsp;</a></span>~AsyncWriterInterface()</h2>
  95. <div class="memitem">
  96. <div class="memproto">
  97. <div class="memtemplate">
  98. template&lt;class W &gt; </div>
  99. <table class="mlabels">
  100. <tr>
  101. <td class="mlabels-left">
  102. <table class="memname">
  103. <tr>
  104. <td class="memname">virtual <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface</a>&lt; W &gt;::~<a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">AsyncWriterInterface</a> </td>
  105. <td>(</td>
  106. <td class="paramname"></td><td>)</td>
  107. <td></td>
  108. </tr>
  109. </table>
  110. </td>
  111. <td class="mlabels-right">
  112. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  113. </tr>
  114. </table>
  115. </div><div class="memdoc">
  116. </div>
  117. </div>
  118. <h2 class="groupheader">Member Function Documentation</h2>
  119. <a id="a9c4e4ce91569478b6656992a35c5ece1"></a>
  120. <h2 class="memtitle"><span class="permalink"><a href="#a9c4e4ce91569478b6656992a35c5ece1">&#9670;&nbsp;</a></span>Write() <span class="overload">[1/2]</span></h2>
  121. <div class="memitem">
  122. <div class="memproto">
  123. <div class="memtemplate">
  124. template&lt;class W &gt; </div>
  125. <table class="mlabels">
  126. <tr>
  127. <td class="mlabels-left">
  128. <table class="memname">
  129. <tr>
  130. <td class="memname">virtual void <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface</a>&lt; W &gt;::Write </td>
  131. <td>(</td>
  132. <td class="paramtype">const W &amp;&#160;</td>
  133. <td class="paramname"><em>msg</em>, </td>
  134. </tr>
  135. <tr>
  136. <td class="paramkey"></td>
  137. <td></td>
  138. <td class="paramtype">void *&#160;</td>
  139. <td class="paramname"><em>tag</em>&#160;</td>
  140. </tr>
  141. <tr>
  142. <td></td>
  143. <td>)</td>
  144. <td></td><td></td>
  145. </tr>
  146. </table>
  147. </td>
  148. <td class="mlabels-right">
  149. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  150. </tr>
  151. </table>
  152. </div><div class="memdoc">
  153. <p>Request the writing of <em>msg</em> with identifying tag <em>tag</em>. </p>
  154. <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__impl_1_1internal_1_1_async_reader_interface.html#a02645c77e024a39abbd922650cfed5fd" title="Read a message of type R into msg. ">AsyncReaderInterface::Read</a></em> </p>
  155. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  156. <dl class="params"><dt>Parameters</dt><dd>
  157. <table class="params">
  158. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  159. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  160. </table>
  161. </dd>
  162. </dl>
  163. <p>Implemented in <a class="el" href="classgrpc__impl_1_1_server_async_reader_writer.html#a1f6ce8f029b65160bbf26937257547c5">grpc_impl::ServerAsyncReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a05daf326ddaeee486dcd771b69329b98">grpc_impl::ServerAsyncWriter&lt; W &gt;</a>, <a class="el" href="classgrpc__impl_1_1_client_async_reader_writer.html#a14cef3c5d9d057e8c672700869cfc7a3">grpc_impl::ClientAsyncReaderWriter&lt; W, R &gt;</a>, and <a class="el" href="classgrpc__impl_1_1_client_async_writer.html#a5a91f21f3a4023afc737bebfc14e7b54">grpc_impl::ClientAsyncWriter&lt; W &gt;</a>.</p>
  164. </div>
  165. </div>
  166. <a id="a8b008c0685622ae659f8a57fb508bb5b"></a>
  167. <h2 class="memtitle"><span class="permalink"><a href="#a8b008c0685622ae659f8a57fb508bb5b">&#9670;&nbsp;</a></span>Write() <span class="overload">[2/2]</span></h2>
  168. <div class="memitem">
  169. <div class="memproto">
  170. <div class="memtemplate">
  171. template&lt;class W &gt; </div>
  172. <table class="mlabels">
  173. <tr>
  174. <td class="mlabels-left">
  175. <table class="memname">
  176. <tr>
  177. <td class="memname">virtual void <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface</a>&lt; W &gt;::Write </td>
  178. <td>(</td>
  179. <td class="paramtype">const W &amp;&#160;</td>
  180. <td class="paramname"><em>msg</em>, </td>
  181. </tr>
  182. <tr>
  183. <td class="paramkey"></td>
  184. <td></td>
  185. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  186. <td class="paramname"><em>options</em>, </td>
  187. </tr>
  188. <tr>
  189. <td class="paramkey"></td>
  190. <td></td>
  191. <td class="paramtype">void *&#160;</td>
  192. <td class="paramname"><em>tag</em>&#160;</td>
  193. </tr>
  194. <tr>
  195. <td></td>
  196. <td>)</td>
  197. <td></td><td></td>
  198. </tr>
  199. </table>
  200. </td>
  201. <td class="mlabels-right">
  202. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  203. </tr>
  204. </table>
  205. </div><div class="memdoc">
  206. <p>Request the writing of <em>msg</em> using WriteOptions <em>options</em> with identifying tag <em>tag</em>. </p>
  207. <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><a class="el" href="classgrpc__impl_1_1internal_1_1_async_reader_interface.html#a02645c77e024a39abbd922650cfed5fd" title="Read a message of type R into msg. ">AsyncReaderInterface::Read</a></em> </p>
  208. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  209. <dl class="params"><dt>Parameters</dt><dd>
  210. <table class="params">
  211. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  212. <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The WriteOptions to be used to write this message. </td></tr>
  213. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  214. </table>
  215. </dd>
  216. </dl>
  217. <p>Implemented in <a class="el" href="classgrpc__impl_1_1_server_async_reader_writer.html#af0a845cd6a0f1405d42c74f0faff08ae">grpc_impl::ServerAsyncReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc__impl_1_1_server_async_writer.html#afbd407cad4ebfbfe199fad243e130c9e">grpc_impl::ServerAsyncWriter&lt; W &gt;</a>, <a class="el" href="classgrpc__impl_1_1_client_async_reader_writer.html#ad70d82540b30f39a119306c0e7ba3b2c">grpc_impl::ClientAsyncReaderWriter&lt; W, R &gt;</a>, and <a class="el" href="classgrpc__impl_1_1_client_async_writer.html#a2d4f04e9e37879524463f9c5e3c88365">grpc_impl::ClientAsyncWriter&lt; W &gt;</a>.</p>
  218. </div>
  219. </div>
  220. <a id="a05ab1b1965def7cec0324fe27b0fa67f"></a>
  221. <h2 class="memtitle"><span class="permalink"><a href="#a05ab1b1965def7cec0324fe27b0fa67f">&#9670;&nbsp;</a></span>WriteLast()</h2>
  222. <div class="memitem">
  223. <div class="memproto">
  224. <div class="memtemplate">
  225. template&lt;class W &gt; </div>
  226. <table class="mlabels">
  227. <tr>
  228. <td class="mlabels-left">
  229. <table class="memname">
  230. <tr>
  231. <td class="memname">void <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface</a>&lt; W &gt;::WriteLast </td>
  232. <td>(</td>
  233. <td class="paramtype">const W &amp;&#160;</td>
  234. <td class="paramname"><em>msg</em>, </td>
  235. </tr>
  236. <tr>
  237. <td class="paramkey"></td>
  238. <td></td>
  239. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  240. <td class="paramname"><em>options</em>, </td>
  241. </tr>
  242. <tr>
  243. <td class="paramkey"></td>
  244. <td></td>
  245. <td class="paramtype">void *&#160;</td>
  246. <td class="paramname"><em>tag</em>&#160;</td>
  247. </tr>
  248. <tr>
  249. <td></td>
  250. <td>)</td>
  251. <td></td><td></td>
  252. </tr>
  253. </table>
  254. </td>
  255. <td class="mlabels-right">
  256. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  257. </tr>
  258. </table>
  259. </div><div class="memdoc">
  260. <p>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>. </p>
  261. <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>
  262. <p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
  263. <dl class="params"><dt>Parameters</dt><dd>
  264. <table class="params">
  265. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
  266. <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The WriteOptions to be used to write this message. </td></tr>
  267. <tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
  268. </table>
  269. </dd>
  270. </dl>
  271. </div>
  272. </div>
  273. <hr/>The documentation for this class was generated from the following file:<ul>
  274. <li>include/grpcpp/impl/codegen/<a class="el" href="impl_2codegen_2async__stream__impl_8h_source.html">async_stream_impl.h</a></li>
  275. </ul>
  276. </div><!-- contents -->
  277. <!-- start footer part -->
  278. <hr class="footer"/><address class="footer"><small>
  279. Generated on Mon Aug 19 2019 12:05:23 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  280. <img class="footer" src="doxygen.png" alt="doxygen"/>
  281. </a> 1.8.13
  282. </small></address>
  283. </body>
  284. </html>