classgrpc_1_1internal_1_1_writer_interface.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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::WriterInterface&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_writer_interface.html">WriterInterface</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::WriterInterface&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_writer_interface.html#details">More...</a></p>
  75. <p><code>#include &lt;<a class="el" href="grpcpp_2impl_2codegen_2sync__stream_8h_source.html">sync_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:a0f3bb9c5625b43d600d33d2bf8c17b60"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a0f3bb9c5625b43d600d33d2bf8c17b60">~WriterInterface</a> ()</td></tr>
  80. <tr class="separator:a0f3bb9c5625b43d600d33d2bf8c17b60"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a8a0facf00dd7edb34f0ebb0247001449"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a8a0facf00dd7edb34f0ebb0247001449">Write</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options)=0</td></tr>
  82. <tr class="memdesc:a8a0facf00dd7edb34f0ebb0247001449"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block to write <em>msg</em> to the stream with <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em>. <a href="classgrpc_1_1internal_1_1_writer_interface.html#a8a0facf00dd7edb34f0ebb0247001449">More...</a><br /></td></tr>
  83. <tr class="separator:a8a0facf00dd7edb34f0ebb0247001449"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:a89d051f5c00ede4469cfb216bd05b594"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a89d051f5c00ede4469cfb216bd05b594">Write</a> (const W &amp;msg)</td></tr>
  85. <tr class="memdesc:a89d051f5c00ede4469cfb216bd05b594"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block to write <em>msg</em> to the stream with default write options. <a href="classgrpc_1_1internal_1_1_writer_interface.html#a89d051f5c00ede4469cfb216bd05b594">More...</a><br /></td></tr>
  86. <tr class="separator:a89d051f5c00ede4469cfb216bd05b594"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ab43631883751b02971d5a1467cf1022b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#ab43631883751b02971d5a1467cf1022b">WriteLast</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options)</td></tr>
  88. <tr class="memdesc:ab43631883751b02971d5a1467cf1022b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write <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>. <a href="classgrpc_1_1internal_1_1_writer_interface.html#ab43631883751b02971d5a1467cf1022b">More...</a><br /></td></tr>
  89. <tr class="separator:ab43631883751b02971d5a1467cf1022b"><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::WriterInterface&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="a0f3bb9c5625b43d600d33d2bf8c17b60"></a>
  97. <h2 class="memtitle"><span class="permalink"><a href="#a0f3bb9c5625b43d600d33d2bf8c17b60">&#9670;&nbsp;</a></span>~WriterInterface()</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_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::~<a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">WriterInterface</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="a89d051f5c00ede4469cfb216bd05b594"></a>
  123. <h2 class="memtitle"><span class="permalink"><a href="#a89d051f5c00ede4469cfb216bd05b594">&#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">bool <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</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><td>)</td>
  137. <td></td>
  138. </tr>
  139. </table>
  140. </td>
  141. <td class="mlabels-right">
  142. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  143. </tr>
  144. </table>
  145. </div><div class="memdoc">
  146. <p>Block to write <em>msg</em> to the stream with default write options. </p>
  147. <p>This is thread-safe with respect to <em><a class="el" href="classgrpc_1_1internal_1_1_reader_interface.html#adfb50ace59b4b9666a46548d3f732ee8" title="Block to read a message and parse to msg.">ReaderInterface::Read</a></em> </p>
  148. <dl class="params"><dt>Parameters</dt><dd>
  149. <table class="params">
  150. <tr><td class="paramname">msg</td><td>The message to be written to the stream.</td></tr>
  151. </table>
  152. </dd>
  153. </dl>
  154. <dl class="section return"><dt>Returns</dt><dd><em>true</em> on success, <em>false</em> when the stream has been closed. </dd></dl>
  155. </div>
  156. </div>
  157. <a id="a8a0facf00dd7edb34f0ebb0247001449"></a>
  158. <h2 class="memtitle"><span class="permalink"><a href="#a8a0facf00dd7edb34f0ebb0247001449">&#9670;&nbsp;</a></span>Write() <span class="overload">[2/2]</span></h2>
  159. <div class="memitem">
  160. <div class="memproto">
  161. <div class="memtemplate">
  162. template&lt;class W &gt; </div>
  163. <table class="mlabels">
  164. <tr>
  165. <td class="mlabels-left">
  166. <table class="memname">
  167. <tr>
  168. <td class="memname">virtual bool <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::Write </td>
  169. <td>(</td>
  170. <td class="paramtype">const W &amp;&#160;</td>
  171. <td class="paramname"><em>msg</em>, </td>
  172. </tr>
  173. <tr>
  174. <td class="paramkey"></td>
  175. <td></td>
  176. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  177. <td class="paramname"><em>options</em>&#160;</td>
  178. </tr>
  179. <tr>
  180. <td></td>
  181. <td>)</td>
  182. <td></td><td></td>
  183. </tr>
  184. </table>
  185. </td>
  186. <td class="mlabels-right">
  187. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  188. </tr>
  189. </table>
  190. </div><div class="memdoc">
  191. <p>Block to write <em>msg</em> to the stream with <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> <em>options</em>. </p>
  192. <p>This is thread-safe with respect to <em><a class="el" href="classgrpc_1_1internal_1_1_reader_interface.html#adfb50ace59b4b9666a46548d3f732ee8" title="Block to read a message and parse to msg.">ReaderInterface::Read</a></em> </p>
  193. <dl class="params"><dt>Parameters</dt><dd>
  194. <table class="params">
  195. <tr><td class="paramname">msg</td><td>The message to be written to the stream. </td></tr>
  196. <tr><td class="paramname">options</td><td>The <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options.">WriteOptions</a> affecting the write operation.</td></tr>
  197. </table>
  198. </dd>
  199. </dl>
  200. <dl class="section return"><dt>Returns</dt><dd><em>true</em> on success, <em>false</em> when the stream has been closed. </dd></dl>
  201. <p>Implemented in <a class="el" href="classgrpc_1_1_server_reader_writer.html#a5f9a047e87d6a75dd3fa54da87e08517">grpc::ServerReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc_1_1_server_split_streamer.html#a41df67e7b770ee9a32b55bf8e09ca76f">grpc::ServerSplitStreamer&lt; RequestType, ResponseType &gt;</a>, and <a class="el" href="classgrpc_1_1_server_unary_streamer.html#ac355fc19dd2c254ce10543789237bae6">grpc::ServerUnaryStreamer&lt; RequestType, ResponseType &gt;</a>.</p>
  202. </div>
  203. </div>
  204. <a id="ab43631883751b02971d5a1467cf1022b"></a>
  205. <h2 class="memtitle"><span class="permalink"><a href="#ab43631883751b02971d5a1467cf1022b">&#9670;&nbsp;</a></span>WriteLast()</h2>
  206. <div class="memitem">
  207. <div class="memproto">
  208. <div class="memtemplate">
  209. template&lt;class W &gt; </div>
  210. <table class="mlabels">
  211. <tr>
  212. <td class="mlabels-left">
  213. <table class="memname">
  214. <tr>
  215. <td class="memname">void <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::WriteLast </td>
  216. <td>(</td>
  217. <td class="paramtype">const W &amp;&#160;</td>
  218. <td class="paramname"><em>msg</em>, </td>
  219. </tr>
  220. <tr>
  221. <td class="paramkey"></td>
  222. <td></td>
  223. <td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
  224. <td class="paramname"><em>options</em>&#160;</td>
  225. </tr>
  226. <tr>
  227. <td></td>
  228. <td>)</td>
  229. <td></td><td></td>
  230. </tr>
  231. </table>
  232. </td>
  233. <td class="mlabels-right">
  234. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  235. </tr>
  236. </table>
  237. </div><div class="memdoc">
  238. <p>Write <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>. </p>
  239. <p>For client, WriteLast is equivalent of performing Write and WritesDone in a single step. <em>msg</em> and trailing metadata are coalesced and sent on wire by calling this function. For server, WriteLast buffers the <em>msg</em>. The writing of <em>msg</em> is held until the service handler returns, where <em>msg</em> and trailing metadata are coalesced and sent on wire. 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>
  240. <dl class="params"><dt>Parameters</dt><dd>
  241. <table class="params">
  242. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written to the stream. </td></tr>
  243. <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>
  244. </table>
  245. </dd>
  246. </dl>
  247. </div>
  248. </div>
  249. <hr/>The documentation for this class was generated from the following file:<ul>
  250. <li>include/grpcpp/impl/codegen/<a class="el" href="grpcpp_2impl_2codegen_2sync__stream_8h_source.html">sync_stream.h</a></li>
  251. </ul>
  252. </div><!-- contents -->
  253. <!-- start footer part -->
  254. <hr class="footer"/><address class="footer"><small>
  255. Generated on Wed Mar 3 2021 19:17:26 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  256. <img class="footer" src="doxygen.png" alt="doxygen"/>
  257. </a> 1.8.17
  258. </small></address>
  259. </body>
  260. </html>