grpcpp_2impl_2codegen_2async__unary__call_8h_source.html 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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++: include/grpcpp/impl/codegen/async_unary_call.h Source File</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. <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-60127042-1', 'auto'); ga('send', 'pageview'); </script></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.13.0-dev</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="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_412f9a3d5dfcba8716486cd870ef4586.html">grpcpp</a></li><li class="navelem"><a class="el" href="dir_84040d6f573b73aa8d12512b533ede11.html">impl</a></li><li class="navelem"><a class="el" href="dir_a33e3e3a3b205cffecbb359564791f71.html">codegen</a></li> </ul>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="headertitle">
  65. <div class="title">async_unary_call.h</div> </div>
  66. </div><!--header-->
  67. <div class="contents">
  68. <a href="grpcpp_2impl_2codegen_2async__unary__call_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * Copyright 2015 gRPC authors.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#ifndef GRPCPP_IMPL_CODEGEN_ASYNC_UNARY_CALL_H</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#define GRPCPP_IMPL_CODEGEN_ASYNC_UNARY_CALL_H</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2call_8h.html">grpcpp/impl/codegen/call.h</a>&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2channel__interface_8h.html">grpcpp/impl/codegen/channel_interface.h</a>&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2client__context_8h.html">grpcpp/impl/codegen/client_context.h</a>&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2server__context_8h.html">grpcpp/impl/codegen/server_context.h</a>&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2service__type_8h.html">grpcpp/impl/codegen/service_type.h</a>&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="grpcpp_2impl_2codegen_2status_8h.html">grpcpp/impl/codegen/status.h</a>&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacegrpc.html">grpc</a> {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">class </span>CompletionQueue;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">extern</span> CoreCodegenInterface* <a class="code" href="namespacegrpc.html#abbcecc18dae64c65df0b6d9aa8bf67a8">g_core_codegen_interface</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> R&gt;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader_interface.html"> 38</a></span>&#160;<span class="keyword">class </span><a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html">ClientAsyncResponseReaderInterface</a> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader_interface.html#aa97dc1ab6a7160a489d2e555102bf5a0"> 40</a></span>&#160; <span class="keyword">virtual</span> <a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html#aa97dc1ab6a7160a489d2e555102bf5a0">~ClientAsyncResponseReaderInterface</a>() {}</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html#a1f0a98a8d6e2ee06236a7ecb971a2ac5">StartCall</a>() = 0;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html#a676e3a03a61c49a82b630d85bbfd366c">ReadInitialMetadata</a>(<span class="keywordtype">void</span>* tag) = 0;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html#a379b1d7477431729e01cd48cf6fc78bb">Finish</a>(R* msg, <a class="code" href="classgrpc_1_1_status.html">Status</a>* status, <span class="keywordtype">void</span>* tag) = 0;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;};</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="keyword">namespace </span>internal {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> R&gt;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html"> 74</a></span>&#160;<span class="keyword">class </span><a class="code" href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html">ClientAsyncResponseReaderFactory</a> {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> W&gt;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html#a5a5e9e8099c895d6e5c0de9449a32681"> 83</a></span>&#160; <span class="keyword">static</span> <a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader&lt;R&gt;</a>* <a class="code" href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html#a5a5e9e8099c895d6e5c0de9449a32681">Create</a>(</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classgrpc_1_1_channel_interface.html">ChannelInterface</a>* channel, <a class="code" href="classgrpc_1_1_completion_queue.html">CompletionQueue</a>* cq,</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; const ::grpc::internal::RpcMethod&amp; method, <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context,</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> W&amp; request, <span class="keywordtype">bool</span> start) {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call.html">::grpc::internal::Call</a> call = channel-&gt;CreateCall(method, context, cq);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">return</span> <span class="keyword">new</span> (g_core_codegen_interface-&gt;grpc_call_arena_alloc(</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; call.<a class="code" href="classgrpc_1_1internal_1_1_call.html#a1ea7cfae5dc2ca7a3bc261825edb6d24">call</a>(), <span class="keyword">sizeof</span>(<a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader&lt;R&gt;</a>)))</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader&lt;R&gt;</a>(call, context, request, start);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; }</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;};</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;} <span class="comment">// namespace internal</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> R&gt;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html"> 98</a></span>&#160;<span class="keyword">class </span><a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader</a> final</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; : <span class="keyword">public</span> <a class="code" href="classgrpc_1_1_client_async_response_reader_interface.html">ClientAsyncResponseReaderInterface</a>&lt;R&gt; {</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="comment">// always allocated against a call arena, no memory free required</span></div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#ad701de69b70727dc0e02f0cc62bb441f"> 102</a></span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span> <span class="keyword">operator</span> <span class="keyword">delete</span>(<span class="keywordtype">void</span>* ptr, std::size_t size) {</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; assert(size == <span class="keyword">sizeof</span>(<a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader</a>));</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; }</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="comment">// This operator should never be called as the memory should be freed as part</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="comment">// of the arena destruction. It only exists to provide a matching operator</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// delete to the operator new so that some compilers will not complain (see</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// there are no tests catching the compiler warning.</span></div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#a019c71f3bc7d352b3dab7a2ef18a2751"> 111</a></span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span> <span class="keyword">operator</span> <span class="keyword">delete</span>(<span class="keywordtype">void</span>*, <span class="keywordtype">void</span>*) { assert(0); }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#aa6bb324b380b1389e38f89f7a0b85c64"> 113</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader.html#aa6bb324b380b1389e38f89f7a0b85c64">StartCall</a>()<span class="keyword"> override </span>{</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; assert(!started_);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; started_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; StartCallInternal();</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#ab45261c3dee4f7b34080593cc899b40d"> 125</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader.html#ab45261c3dee4f7b34080593cc899b40d">ReadInitialMetadata</a>(<span class="keywordtype">void</span>* tag)<span class="keyword"> override </span>{</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; assert(started_);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <a class="code" href="grpcpp_2impl_2codegen_2core__codegen__interface_8h.html#a39c1421e7081b57c503487659e2653a5">GPR_CODEGEN_ASSERT</a>(!context_-&gt;initial_metadata_received_);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; single_buf.set_output_tag(tag);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; single_buf.RecvInitialMetadata(context_);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; call_.PerformOps(&amp;single_buf);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; initial_metadata_read_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#a48b0b4dabcbaf4b4a12e4f094ac79b59"> 140</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_client_async_response_reader.html#a48b0b4dabcbaf4b4a12e4f094ac79b59">Finish</a>(R* msg, <a class="code" href="classgrpc_1_1_status.html">Status</a>* status, <span class="keywordtype">void</span>* tag)<span class="keyword"> override </span>{</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; assert(started_);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">if</span> (initial_metadata_read_) {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; finish_buf.set_output_tag(tag);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; finish_buf.RecvMessage(msg);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; finish_buf.AllowNoMessage();</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; finish_buf.ClientRecvStatus(context_, status);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; call_.PerformOps(&amp;finish_buf);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; single_buf.set_output_tag(tag);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; single_buf.RecvInitialMetadata(context_);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; single_buf.RecvMessage(msg);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; single_buf.AllowNoMessage();</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; single_buf.ClientRecvStatus(context_, status);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; call_.PerformOps(&amp;single_buf);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; }</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; }</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classgrpc_1_1_client_async_response_reader.html#a4c770c83322c2f90be8c02417807ef85"> 159</a></span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html">internal::ClientAsyncResponseReaderFactory</a>&lt;R&gt;;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* <span class="keyword">const</span> context_;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call.html">::grpc::internal::Call</a> call_;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordtype">bool</span> started_;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordtype">bool</span> initial_metadata_read_ = <span class="keyword">false</span>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> W&gt;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader</a>(::<a class="code" href="classgrpc_1_1internal_1_1_call.html">grpc::internal::Call</a> call, <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context,</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keyword">const</span> W&amp; request, <span class="keywordtype">bool</span> start)</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; : context_(context), call_(call), started_(start) {</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="comment">// Bind the metadata at time of StartCallInternal but set up the rest here</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// TODO(ctiller): don&#39;t assert</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <a class="code" href="grpcpp_2impl_2codegen_2core__codegen__interface_8h.html#a39c1421e7081b57c503487659e2653a5">GPR_CODEGEN_ASSERT</a>(single_buf.SendMessage(request).ok());</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; single_buf.ClientSendClose();</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordflow">if</span> (start) StartCallInternal();</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; }</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordtype">void</span> StartCallInternal() {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; single_buf.SendInitialMetadata(context_-&gt;send_initial_metadata_,</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; context_-&gt;initial_metadata_flags());</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// disable operator new</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span>* <span class="keyword">operator</span> <span class="keyword">new</span>(std::size_t size);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span>* <span class="keyword">operator</span> <span class="keyword">new</span>(std::size_t size, <span class="keywordtype">void</span>* p) { <span class="keywordflow">return</span> p; }</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_set.html">::grpc::internal::CallOpSet</a>&lt;<a class="code" href="classgrpc_1_1internal_1_1_call_op_send_initial_metadata.html">::grpc::internal::CallOpSendInitialMetadata</a>,</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_send_message.html">::grpc::internal::CallOpSendMessage</a>,</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_client_send_close.html">::grpc::internal::CallOpClientSendClose</a>,</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_recv_initial_metadata.html">::grpc::internal::CallOpRecvInitialMetadata</a>,</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_recv_message.html">::grpc::internal::CallOpRecvMessage&lt;R&gt;</a>,</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_client_recv_status.html">::grpc::internal::CallOpClientRecvStatus</a>&gt;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; single_buf;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_set.html">::grpc::internal::CallOpSet&lt;::grpc::internal::CallOpRecvMessage&lt;R&gt;</a>,</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_client_recv_status.html">::grpc::internal::CallOpClientRecvStatus</a>&gt;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; finish_buf;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;};</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> W&gt;</div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classgrpc_1_1_server_async_response_writer.html"> 200</a></span>&#160;<span class="keyword">class </span><a class="code" href="classgrpc_1_1_server_async_response_writer.html">ServerAsyncResponseWriter</a> final</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; : <span class="keyword">public</span> <a class="code" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html">internal::ServerAsyncStreamingInterface</a> {</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classgrpc_1_1_server_async_response_writer.html#a3c97a19ba6eaa0b9eef9b6b86dbad9e9"> 203</a></span>&#160; <span class="keyword">explicit</span> <a class="code" href="classgrpc_1_1_server_async_response_writer.html#a3c97a19ba6eaa0b9eef9b6b86dbad9e9">ServerAsyncResponseWriter</a>(<a class="code" href="classgrpc_1_1_server_context.html">ServerContext</a>* ctx)</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834"> 213</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">SendInitialMetadata</a>(<span class="keywordtype">void</span>* tag)<span class="keyword"> override </span>{</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="code" href="grpcpp_2impl_2codegen_2core__codegen__interface_8h.html#a39c1421e7081b57c503487659e2653a5">GPR_CODEGEN_ASSERT</a>(!ctx_-&gt;sent_initial_metadata_);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; meta_buf_.set_output_tag(tag);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; meta_buf_.SendInitialMetadata(ctx_-&gt;initial_metadata_,</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; ctx_-&gt;initial_metadata_flags());</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">if</span> (ctx_-&gt;compression_level_set()) {</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; meta_buf_.set_compression_level(ctx_-&gt;compression_level());</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; }</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; ctx_-&gt;sent_initial_metadata_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; call_.<a class="code" href="classgrpc_1_1internal_1_1_call.html#a1f4ef57973eacb5e6f11e6193f2b3f7f">PerformOps</a>(&amp;meta_buf_);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; }</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classgrpc_1_1_server_async_response_writer.html#ad1e22d187c82a537ded4504fbdef6809"> 241</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_server_async_response_writer.html#ad1e22d187c82a537ded4504fbdef6809">Finish</a>(<span class="keyword">const</span> W&amp; msg, <span class="keyword">const</span> <a class="code" href="classgrpc_1_1_status.html">Status</a>&amp; status, <span class="keywordtype">void</span>* tag) {</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; finish_buf_.set_output_tag(tag);</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="keywordflow">if</span> (!ctx_-&gt;sent_initial_metadata_) {</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; finish_buf_.SendInitialMetadata(ctx_-&gt;initial_metadata_,</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; ctx_-&gt;initial_metadata_flags());</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">if</span> (ctx_-&gt;compression_level_set()) {</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; finish_buf_.set_compression_level(ctx_-&gt;compression_level());</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; }</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; ctx_-&gt;sent_initial_metadata_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; }</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="comment">// The response is dropped if the status is not OK.</span></div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keywordflow">if</span> (status.<a class="code" href="classgrpc_1_1_status.html#ab80672b5665c32dc0937a0d58a3ce192">ok</a>()) {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; finish_buf_.ServerSendStatus(ctx_-&gt;trailing_metadata_,</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; finish_buf_.SendMessage(msg));</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; finish_buf_.ServerSendStatus(ctx_-&gt;trailing_metadata_, status);</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; }</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; call_.<a class="code" href="classgrpc_1_1internal_1_1_call.html#a1f4ef57973eacb5e6f11e6193f2b3f7f">PerformOps</a>(&amp;finish_buf_);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; }</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;</div><div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="classgrpc_1_1_server_async_response_writer.html#af1e5812c2a8017bf82e84748f201ce93"> 273</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_server_async_response_writer.html#af1e5812c2a8017bf82e84748f201ce93">FinishWithError</a>(<span class="keyword">const</span> <a class="code" href="classgrpc_1_1_status.html">Status</a>&amp; status, <span class="keywordtype">void</span>* tag) {</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <a class="code" href="grpcpp_2impl_2codegen_2core__codegen__interface_8h.html#a39c1421e7081b57c503487659e2653a5">GPR_CODEGEN_ASSERT</a>(!status.<a class="code" href="classgrpc_1_1_status.html#ab80672b5665c32dc0937a0d58a3ce192">ok</a>());</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; finish_buf_.set_output_tag(tag);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keywordflow">if</span> (!ctx_-&gt;sent_initial_metadata_) {</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; finish_buf_.SendInitialMetadata(ctx_-&gt;initial_metadata_,</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; ctx_-&gt;initial_metadata_flags());</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <span class="keywordflow">if</span> (ctx_-&gt;compression_level_set()) {</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; finish_buf_.set_compression_level(ctx_-&gt;compression_level());</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; }</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; ctx_-&gt;sent_initial_metadata_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; }</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; finish_buf_.ServerSendStatus(ctx_-&gt;trailing_metadata_, status);</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; call_.<a class="code" href="classgrpc_1_1internal_1_1_call.html#a1f4ef57973eacb5e6f11e6193f2b3f7f">PerformOps</a>(&amp;finish_buf_);</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; }</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <span class="keywordtype">void</span> BindCall(::<a class="code" href="classgrpc_1_1internal_1_1_call.html">grpc::internal::Call</a>* call)<span class="keyword"> override </span>{ call_ = *call; }</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call.html">::grpc::internal::Call</a> call_;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <a class="code" href="classgrpc_1_1_server_context.html">ServerContext</a>* ctx_;</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_set.html">::grpc::internal::CallOpSet&lt;::grpc::internal::CallOpSendInitialMetadata&gt;</a></div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; meta_buf_;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_set.html">::grpc::internal::CallOpSet</a>&lt;<a class="code" href="classgrpc_1_1internal_1_1_call_op_send_initial_metadata.html">::grpc::internal::CallOpSendInitialMetadata</a>,</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_send_message.html">::grpc::internal::CallOpSendMessage</a>,</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <a class="code" href="classgrpc_1_1internal_1_1_call_op_server_send_status.html">::grpc::internal::CallOpServerSendStatus</a>&gt;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; finish_buf_;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;};</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;} <span class="comment">// namespace grpc</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="namespacestd.html"> 303</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacestd.html">std</a> {</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> R&gt;</div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_3_01_r_01_4_01_4.html"> 305</a></span>&#160;<span class="keyword">class </span>default_delete&lt;<a class="code" href="namespacegrpc.html">grpc</a>::ClientAsyncResponseReader&lt;R&gt;&gt; {</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_3_01_r_01_4_01_4.html#a60900891d4046502b0db758b2fba089f"> 307</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_3_01_r_01_4_01_4.html#a60900891d4046502b0db758b2fba089f">operator()</a>(<span class="keywordtype">void</span>* p) {}</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;};</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> R&gt;</div><div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_interface_3_01_r_01_4_01_4.html"> 310</a></span>&#160;<span class="keyword">class </span>default_delete&lt;<a class="code" href="namespacegrpc.html">grpc</a>::ClientAsyncResponseReaderInterface&lt;R&gt;&gt; {</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_interface_3_01_r_01_4_01_4.html#a44082f89efbb8d1f8a58a1c748d267f1"> 312</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_interface_3_01_r_01_4_01_4.html#a44082f89efbb8d1f8a58a1c748d267f1">operator()</a>(<span class="keywordtype">void</span>* p) {}</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;};</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;} <span class="comment">// namespace std</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;<span class="preprocessor">#endif // GRPCPP_IMPL_CODEGEN_ASYNC_UNARY_CALL_H</span></div><div class="ttc" id="classgrpc_1_1_server_async_response_writer_html_af1e5812c2a8017bf82e84748f201ce93"><div class="ttname"><a href="classgrpc_1_1_server_async_response_writer.html#af1e5812c2a8017bf82e84748f201ce93">grpc::ServerAsyncResponseWriter::FinishWithError</a></div><div class="ttdeci">void FinishWithError(const Status &amp;status, void *tag)</div><div class="ttdoc">Indicate that the stream is to be finished with a non-OK status, and request notification for when th...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:273</div></div>
  69. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_interface_html_aa97dc1ab6a7160a489d2e555102bf5a0"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader_interface.html#aa97dc1ab6a7160a489d2e555102bf5a0">grpc::ClientAsyncResponseReaderInterface::~ClientAsyncResponseReaderInterface</a></div><div class="ttdeci">virtual ~ClientAsyncResponseReaderInterface()</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:40</div></div>
  70. <div class="ttc" id="grpcpp_2impl_2codegen_2service__type_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2service__type_8h.html">service_type.h</a></div></div>
  71. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_interface_html_a379b1d7477431729e01cd48cf6fc78bb"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader_interface.html#a379b1d7477431729e01cd48cf6fc78bb">grpc::ClientAsyncResponseReaderInterface::Finish</a></div><div class="ttdeci">virtual void Finish(R *msg, Status *status, void *tag)=0</div><div class="ttdoc">Request to receive the server&amp;#39;s response msg and final status for the call, and to notify tag on this...</div></div>
  72. <div class="ttc" id="grpcpp_2impl_2codegen_2core__codegen__interface_8h_html_a39c1421e7081b57c503487659e2653a5"><div class="ttname"><a href="grpcpp_2impl_2codegen_2core__codegen__interface_8h.html#a39c1421e7081b57c503487659e2653a5">GPR_CODEGEN_ASSERT</a></div><div class="ttdeci">#define GPR_CODEGEN_ASSERT(x)</div><div class="ttdoc">Codegen specific version of GPR_ASSERT. </div><div class="ttdef"><b>Definition:</b> core_codegen_interface.h:138</div></div>
  73. <div class="ttc" id="grpcpp_2impl_2codegen_2server__context_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2server__context_8h.html">server_context.h</a></div></div>
  74. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_interface_html_a1f0a98a8d6e2ee06236a7ecb971a2ac5"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader_interface.html#a1f0a98a8d6e2ee06236a7ecb971a2ac5">grpc::ClientAsyncResponseReaderInterface::StartCall</a></div><div class="ttdeci">virtual void StartCall()=0</div><div class="ttdoc">Start the call that was set up by the constructor, but only if the constructor was invoked through th...</div></div>
  75. <div class="ttc" id="classgrpc_1_1internal_1_1_client_async_response_reader_factory_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html">grpc::internal::ClientAsyncResponseReaderFactory</a></div><div class="ttdef"><b>Definition:</b> async_unary_call.h:74</div></div>
  76. <div class="ttc" id="classgrpc_1_1_server_async_response_writer_html_ad1e22d187c82a537ded4504fbdef6809"><div class="ttname"><a href="classgrpc_1_1_server_async_response_writer.html#ad1e22d187c82a537ded4504fbdef6809">grpc::ServerAsyncResponseWriter::Finish</a></div><div class="ttdeci">void Finish(const W &amp;msg, const Status &amp;status, void *tag)</div><div class="ttdoc">Indicate that the stream is to be finished and request notification when the server has sent the appr...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:241</div></div>
  77. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_set_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_set.html">grpc::internal::CallOpSet</a></div><div class="ttdoc">Primary implementation of CallOpSetInterface. </div><div class="ttdef"><b>Definition:</b> call.h:619</div></div>
  78. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_html_aa6bb324b380b1389e38f89f7a0b85c64"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader.html#aa6bb324b380b1389e38f89f7a0b85c64">grpc::ClientAsyncResponseReader::StartCall</a></div><div class="ttdeci">void StartCall() override</div><div class="ttdoc">Start the call that was set up by the constructor, but only if the constructor was invoked through th...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:113</div></div>
  79. <div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdef"><b>Definition:</b> async_unary_call.h:303</div></div>
  80. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_interface_html_a676e3a03a61c49a82b630d85bbfd366c"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader_interface.html#a676e3a03a61c49a82b630d85bbfd366c">grpc::ClientAsyncResponseReaderInterface::ReadInitialMetadata</a></div><div class="ttdeci">virtual void ReadInitialMetadata(void *tag)=0</div><div class="ttdoc">Request notification of the reading of initial metadata. </div></div>
  81. <div class="ttc" id="classgrpc_1_1internal_1_1_server_async_streaming_interface_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html">grpc::internal::ServerAsyncStreamingInterface</a></div><div class="ttdef"><b>Definition:</b> service_type.h:39</div></div>
  82. <div class="ttc" id="classgrpc_1_1internal_1_1_call_html_a1ea7cfae5dc2ca7a3bc261825edb6d24"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call.html#a1ea7cfae5dc2ca7a3bc261825edb6d24">grpc::internal::Call::call</a></div><div class="ttdeci">grpc_call * call() const</div><div class="ttdef"><b>Definition:</b> call.h:680</div></div>
  83. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_html"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader.html">grpc::ClientAsyncResponseReader</a></div><div class="ttdoc">Async API for client-side unary RPCs, where the message response received from the server is of type ...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:98</div></div>
  84. <div class="ttc" id="classgrpc_1_1_client_context_html"><div class="ttname"><a href="classgrpc_1_1_client_context.html">grpc::ClientContext</a></div><div class="ttdoc">A ClientContext allows the person implementing a service client to: </div><div class="ttdef"><b>Definition:</b> client_context.h:162</div></div>
  85. <div class="ttc" id="grpcpp_2impl_2codegen_2client__context_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2client__context_8h.html">client_context.h</a></div></div>
  86. <div class="ttc" id="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_3_01_r_01_4_01_4_html_a60900891d4046502b0db758b2fba089f"><div class="ttname"><a href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_3_01_r_01_4_01_4.html#a60900891d4046502b0db758b2fba089f">std::default_delete&lt; grpc::ClientAsyncResponseReader&lt; R &gt; &gt;::operator()</a></div><div class="ttdeci">void operator()(void *p)</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:307</div></div>
  87. <div class="ttc" id="classgrpc_1_1_server_async_response_writer_html_a451ba3cd9093168a6becd137b1720834"><div class="ttname"><a href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">grpc::ServerAsyncResponseWriter::SendInitialMetadata</a></div><div class="ttdeci">void SendInitialMetadata(void *tag) override</div><div class="ttdoc">See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. </div><div class="ttdef"><b>Definition:</b> async_unary_call.h:213</div></div>
  88. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_server_send_status_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_server_send_status.html">grpc::internal::CallOpServerSendStatus</a></div><div class="ttdef"><b>Definition:</b> call.h:466</div></div>
  89. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_send_initial_metadata_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_send_initial_metadata.html">grpc::internal::CallOpSendInitialMetadata</a></div><div class="ttdef"><b>Definition:</b> call.h:215</div></div>
  90. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_recv_initial_metadata_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_recv_initial_metadata.html">grpc::internal::CallOpRecvInitialMetadata</a></div><div class="ttdef"><b>Definition:</b> call.h:513</div></div>
  91. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_interface_html"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader_interface.html">grpc::ClientAsyncResponseReaderInterface</a></div><div class="ttdoc">An interface relevant for async client side unary RPCs (which send one request message to a server an...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:38</div></div>
  92. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_send_message_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_send_message.html">grpc::internal::CallOpSendMessage</a></div><div class="ttdef"><b>Definition:</b> call.h:268</div></div>
  93. <div class="ttc" id="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_interface_3_01_r_01_4_01_4_html_a44082f89efbb8d1f8a58a1c748d267f1"><div class="ttname"><a href="classstd_1_1default__delete_3_01grpc_1_1_client_async_response_reader_interface_3_01_r_01_4_01_4.html#a44082f89efbb8d1f8a58a1c748d267f1">std::default_delete&lt; grpc::ClientAsyncResponseReaderInterface&lt; R &gt; &gt;::operator()</a></div><div class="ttdeci">void operator()(void *p)</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:312</div></div>
  94. <div class="ttc" id="classgrpc_1_1internal_1_1_client_async_response_reader_factory_html_a5a5e9e8099c895d6e5c0de9449a32681"><div class="ttname"><a href="classgrpc_1_1internal_1_1_client_async_response_reader_factory.html#a5a5e9e8099c895d6e5c0de9449a32681">grpc::internal::ClientAsyncResponseReaderFactory::Create</a></div><div class="ttdeci">static ClientAsyncResponseReader&lt; R &gt; * Create(ChannelInterface *channel, CompletionQueue *cq, const ::grpc::internal::RpcMethod &amp;method, ClientContext *context, const W &amp;request, bool start)</div><div class="ttdoc">Start a call and write the request out if start is set. </div><div class="ttdef"><b>Definition:</b> async_unary_call.h:83</div></div>
  95. <div class="ttc" id="namespacegrpc_html"><div class="ttname"><a href="namespacegrpc.html">grpc</a></div><div class="ttdoc">An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...</div><div class="ttdef"><b>Definition:</b> alarm.h:31</div></div>
  96. <div class="ttc" id="classgrpc_1_1_channel_interface_html"><div class="ttname"><a href="classgrpc_1_1_channel_interface.html">grpc::ChannelInterface</a></div><div class="ttdoc">Codegen interface for grpc::Channel. </div><div class="ttdef"><b>Definition:</b> channel_interface.h:55</div></div>
  97. <div class="ttc" id="namespacegrpc_html_abbcecc18dae64c65df0b6d9aa8bf67a8"><div class="ttname"><a href="namespacegrpc.html#abbcecc18dae64c65df0b6d9aa8bf67a8">grpc::g_core_codegen_interface</a></div><div class="ttdeci">CoreCodegenInterface * g_core_codegen_interface</div><div class="ttdef"><b>Definition:</b> call.h:46</div></div>
  98. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_html_ab45261c3dee4f7b34080593cc899b40d"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader.html#ab45261c3dee4f7b34080593cc899b40d">grpc::ClientAsyncResponseReader::ReadInitialMetadata</a></div><div class="ttdeci">void ReadInitialMetadata(void *tag) override</div><div class="ttdoc">See ClientAsyncResponseReaderInterface::ReadInitialMetadata for semantics. </div><div class="ttdef"><b>Definition:</b> async_unary_call.h:125</div></div>
  99. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_recv_message_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_recv_message.html">grpc::internal::CallOpRecvMessage</a></div><div class="ttdef"><b>Definition:</b> byte_buffer.h:41</div></div>
  100. <div class="ttc" id="classgrpc_1_1_server_context_html"><div class="ttname"><a href="classgrpc_1_1_server_context.html">grpc::ServerContext</a></div><div class="ttdoc">A ServerContext allows the person implementing a service handler to: </div><div class="ttdef"><b>Definition:</b> server_context.h:96</div></div>
  101. <div class="ttc" id="grpcpp_2impl_2codegen_2channel__interface_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2channel__interface_8h.html">channel_interface.h</a></div></div>
  102. <div class="ttc" id="classgrpc_1_1_completion_queue_html"><div class="ttname"><a href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a></div><div class="ttdoc">A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h). </div><div class="ttdef"><b>Definition:</b> completion_queue.h:94</div></div>
  103. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_client_send_close_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_client_send_close.html">grpc::internal::CallOpClientSendClose</a></div><div class="ttdef"><b>Definition:</b> call.h:446</div></div>
  104. <div class="ttc" id="classgrpc_1_1_status_html_ab80672b5665c32dc0937a0d58a3ce192"><div class="ttname"><a href="classgrpc_1_1_status.html#ab80672b5665c32dc0937a0d58a3ce192">grpc::Status::ok</a></div><div class="ttdeci">bool ok() const</div><div class="ttdoc">Is the status OK? </div><div class="ttdef"><b>Definition:</b> status.h:118</div></div>
  105. <div class="ttc" id="classgrpc_1_1_server_async_response_writer_html_a3c97a19ba6eaa0b9eef9b6b86dbad9e9"><div class="ttname"><a href="classgrpc_1_1_server_async_response_writer.html#a3c97a19ba6eaa0b9eef9b6b86dbad9e9">grpc::ServerAsyncResponseWriter::ServerAsyncResponseWriter</a></div><div class="ttdeci">ServerAsyncResponseWriter(ServerContext *ctx)</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:203</div></div>
  106. <div class="ttc" id="grpcpp_2impl_2codegen_2status_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2status_8h.html">status.h</a></div></div>
  107. <div class="ttc" id="classgrpc_1_1_status_html"><div class="ttname"><a href="classgrpc_1_1_status.html">grpc::Status</a></div><div class="ttdoc">Did it work? If it didn&amp;#39;t, why? </div><div class="ttdef"><b>Definition:</b> status.h:31</div></div>
  108. <div class="ttc" id="classgrpc_1_1_server_async_response_writer_html"><div class="ttname"><a href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a></div><div class="ttdoc">Async server-side API for handling unary calls, where the single response message sent to the client ...</div><div class="ttdef"><b>Definition:</b> async_unary_call.h:200</div></div>
  109. <div class="ttc" id="classgrpc_1_1_client_async_response_reader_html_a48b0b4dabcbaf4b4a12e4f094ac79b59"><div class="ttname"><a href="classgrpc_1_1_client_async_response_reader.html#a48b0b4dabcbaf4b4a12e4f094ac79b59">grpc::ClientAsyncResponseReader::Finish</a></div><div class="ttdeci">void Finish(R *msg, Status *status, void *tag) override</div><div class="ttdoc">See ClientAysncResponseReaderInterface::Finish for semantics. </div><div class="ttdef"><b>Definition:</b> async_unary_call.h:140</div></div>
  110. <div class="ttc" id="classgrpc_1_1internal_1_1_call_html_a1f4ef57973eacb5e6f11e6193f2b3f7f"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call.html#a1f4ef57973eacb5e6f11e6193f2b3f7f">grpc::internal::Call::PerformOps</a></div><div class="ttdeci">void PerformOps(CallOpSetInterface *ops)</div><div class="ttdef"><b>Definition:</b> call.h:676</div></div>
  111. <div class="ttc" id="classgrpc_1_1internal_1_1_call_op_client_recv_status_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call_op_client_recv_status.html">grpc::internal::CallOpClientRecvStatus</a></div><div class="ttdef"><b>Definition:</b> call.h:542</div></div>
  112. <div class="ttc" id="grpcpp_2impl_2codegen_2call_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2call_8h.html">call.h</a></div></div>
  113. <div class="ttc" id="classgrpc_1_1internal_1_1_call_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_call.html">grpc::internal::Call</a></div><div class="ttdoc">Straightforward wrapping of the C call object. </div><div class="ttdef"><b>Definition:</b> call.h:660</div></div>
  114. </div><!-- fragment --></div><!-- contents -->
  115. <!-- start footer part -->
  116. <hr class="footer"/><address class="footer"><small>
  117. Generated on Tue May 15 2018 17:01:01 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  118. <img class="footer" src="doxygen.png" alt="doxygen"/>
  119. </a> 1.8.13
  120. </small></address>
  121. </body>
  122. </html>