267 lines
43 KiB
HTML
267 lines
43 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GRPC C++: include/grpcpp/generic/generic_stub.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">GRPC C++
|
|
 <span id="projectnumber">1.58.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<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_d0687bfb49a2d724b4c01763956c068f.html">generic</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">generic_stub.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="grpcpp_2generic_2generic__stub_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> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Copyright 2015 gRPC authors.</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <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> <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> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <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> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <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> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <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> <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> <span class="comment">// limitations under the License.</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef GRPCPP_GENERIC_GENERIC_STUB_H</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define GRPCPP_GENERIC_GENERIC_STUB_H</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  </div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <functional></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2client__context_8h.html">grpcpp/client_context.h</a>></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2rpc__method_8h.html">grpcpp/impl/rpc_method.h</a>></span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2support_2async__stream_8h.html">grpcpp/support/async_stream.h</a>></span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2support_2async__unary__call_8h.html">grpcpp/support/async_unary_call.h</a>></span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2support_2byte__buffer_8h.html">grpcpp/support/byte_buffer.h</a>></span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="support_2client__callback_8h.html">grpcpp/support/client_callback.h</a>></span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2support_2status_8h.html">grpcpp/support/status.h</a>></span></div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2support_2stub__options_8h.html">grpcpp/support/stub_options.h</a>></span></div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span><a class="code" href="namespacegrpc.html">grpc</a> {</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="namespacegrpc.html#aba53fb6f2502caa167e9528e5c560539"> 35</a></span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1_completion_queue.html">CompletionQueue</a>;</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">typedef</span> <a class="code" href="classgrpc_1_1_client_async_reader_writer.html">ClientAsyncReaderWriter<ByteBuffer, ByteBuffer></a></div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="namespacegrpc.html#aba53fb6f2502caa167e9528e5c560539">GenericClientAsyncReaderWriter</a>;</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespacegrpc.html#a7ee9bd108774bc00defacc5b4fb695df"> 39</a></span> <span class="keyword">typedef</span> <a class="code" href="classgrpc_1_1_client_async_response_reader.html">ClientAsyncResponseReader<ByteBuffer></a> <a class="code" href="namespacegrpc.html#a7ee9bd108774bc00defacc5b4fb695df">GenericClientAsyncResponseReader</a>;</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">template</span> <<span class="keyword">class</span> RequestType, <span class="keyword">class</span> ResponseType></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html"> 45</a></span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1_templated_generic_stub.html">TemplatedGenericStub</a> final {</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#ac304d65b478ea61991aa3e65430315cb"> 47</a></span>  <span class="keyword">explicit</span> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#ac304d65b478ea61991aa3e65430315cb">TemplatedGenericStub</a>(std::shared_ptr<grpc::ChannelInterface> channel)</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  : channel_(channel) {}</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>></div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#a19737a9fe9dffdd0ac67f532f38d900f"> 55</a></span>  <a class="code" href="classgrpc_1_1_templated_generic_stub.html#a19737a9fe9dffdd0ac67f532f38d900f">PrepareCall</a>(<a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq) {</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> CallInternal(channel_.get(), context, method, <span class="comment">/*options=*/</span>{}, cq,</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">false</span>, <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  }</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#aee40f32f1aca95867d805205a17e6ffc"> 65</a></span>  std::unique_ptr<ClientAsyncResponseReader<ResponseType>> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#aee40f32f1aca95867d805205a17e6ffc">PrepareUnaryCall</a>(</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">const</span> RequestType& request, <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq) {</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> std::unique_ptr<ClientAsyncResponseReader<ResponseType>>(</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  internal::ClientAsyncResponseReaderHelper::Create<ResponseType>(</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  channel_.get(), cq,</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a>(method.c_str(),</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="comment">/*suffix_for_stats=*/</span><span class="keyword">nullptr</span>,</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a73dbd8998b4364e284ade7c00a57ec37">grpc::internal::RpcMethod::NORMAL_RPC</a>),</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  context, request));</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  }</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  </div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#a8c868713afa718beb61f2cb79dfb8fa6"> 83</a></span>  std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#a8c868713afa718beb61f2cb79dfb8fa6">Call</a>(</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq, <span class="keywordtype">void</span>* tag) {</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> CallInternal(channel_.get(), context, method, <span class="comment">/*options=*/</span>{}, cq,</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keyword">true</span>, tag);</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  }</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#aeeb347bd31f2f5245227bac977b308bb"> 92</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#aeeb347bd31f2f5245227bac977b308bb">UnaryCall</a>(<a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classgrpc_1_1_stub_options.html">StubOptions</a> options, <span class="keyword">const</span> RequestType* request,</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  ResponseType* response,</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  std::function<<span class="keywordtype">void</span>(<a class="code" href="classgrpc_1_1_status.html">grpc::Status</a>)> on_completion) {</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  UnaryCallInternal(context, method, options, request, response,</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  std::move(on_completion));</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#a7070aa80618833c3aaac58659eb80cdf"> 104</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#a7070aa80618833c3aaac58659eb80cdf">PrepareUnaryCall</a>(<a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classgrpc_1_1_stub_options.html">StubOptions</a> options, <span class="keyword">const</span> RequestType* request,</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  ResponseType* response, <a class="code" href="classgrpc_1_1_client_unary_reactor.html">ClientUnaryReactor</a>* reactor) {</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  PrepareUnaryCallInternal(context, method, options, request, response,</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  reactor);</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classgrpc_1_1_templated_generic_stub.html#ac1043b3236bca92cf95ca165a66b105a"> 114</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_templated_generic_stub.html#ac1043b3236bca92cf95ca165a66b105a">PrepareBidiStreamingCall</a>(</div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method, <a class="code" href="classgrpc_1_1_stub_options.html">StubOptions</a> options,</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="classgrpc_1_1_client_bidi_reactor.html">ClientBidiReactor<RequestType, ResponseType></a>* reactor) {</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  PrepareBidiStreamingCallInternal(context, method, options, reactor);</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  </div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  std::shared_ptr<grpc::ChannelInterface> channel_;</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  </div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordtype">void</span> UnaryCallInternal(<a class="code" href="classgrpc_1_1_client_context.html">ClientContext</a>* context, <span class="keyword">const</span> std::string& method,</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="classgrpc_1_1_stub_options.html">StubOptions</a> options, <span class="keyword">const</span> RequestType* request,</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  ResponseType* response,</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  std::function<<span class="keywordtype">void</span>(<a class="code" href="classgrpc_1_1_status.html">grpc::Status</a>)> on_completion) {</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="namespacegrpc_1_1internal.html#a86a4b381ea65c6fc72a334a0aff2b475">internal::CallbackUnaryCall</a>(</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  channel_.get(),</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a>(method.c_str(), options.<a class="code" href="classgrpc_1_1_stub_options.html#a3c4ef89239f3228f33789a2d11d21ef3">suffix_for_stats</a>(),</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a73dbd8998b4364e284ade7c00a57ec37">grpc::internal::RpcMethod::NORMAL_RPC</a>),</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  context, request, response, std::move(on_completion));</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">void</span> PrepareUnaryCallInternal(ClientContext* context,</div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">const</span> std::string& method, StubOptions options,</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">const</span> RequestType* request,</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  ResponseType* response,</div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  ClientUnaryReactor* reactor) {</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  internal::ClientCallbackUnaryFactory::Create<RequestType, ResponseType>(</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  channel_.get(),</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a>(method.c_str(), options.suffix_for_stats(),</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a73dbd8998b4364e284ade7c00a57ec37">grpc::internal::RpcMethod::NORMAL_RPC</a>),</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  context, request, response, reactor);</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordtype">void</span> PrepareBidiStreamingCallInternal(</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  ClientContext* context, <span class="keyword">const</span> std::string& method, StubOptions options,</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  ClientBidiReactor<RequestType, ResponseType>* reactor) {</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="classgrpc_1_1internal_1_1_client_callback_reader_writer_factory.html#aa9084bd495a274622783e408c1353a6d">internal::ClientCallbackReaderWriterFactory<RequestType, ResponseType>::</a></div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <a class="code" href="classgrpc_1_1internal_1_1_client_callback_reader_writer_factory.html#aa9084bd495a274622783e408c1353a6d"> Create</a>(channel_.get(),</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a>(</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  method.c_str(), options.suffix_for_stats(),</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a8308d189db6d81509042a321ac91b00f">grpc::internal::RpcMethod::BIDI_STREAMING</a>),</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  context, reactor);</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>></div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  CallInternal(<a class="code" href="classgrpc_1_1_channel_interface.html">grpc::ChannelInterface</a>* channel, ClientContext* context,</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keyword">const</span> std::string& method, StubOptions options,</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a>* cq, <span class="keywordtype">bool</span> start, <span class="keywordtype">void</span>* tag) {</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">return</span> std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>>(</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classgrpc_1_1internal_1_1_client_async_reader_writer_factory.html#ad3759cfa9f62989b1efb48e783e05886">internal::ClientAsyncReaderWriterFactory<RequestType, ResponseType>::</a></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <a class="code" href="classgrpc_1_1internal_1_1_client_async_reader_writer_factory.html#ad3759cfa9f62989b1efb48e783e05886"> Create</a>(channel, cq,</div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a>(</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  method.c_str(), options.suffix_for_stats(),</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a8308d189db6d81509042a321ac91b00f">grpc::internal::RpcMethod::BIDI_STREAMING</a>),</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  context, start, tag));</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> };</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  </div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="namespacegrpc.html#ac44a8983b461983cc7a1d67119a606ac"> 171</a></span> <span class="keyword">typedef</span> <a class="code" href="classgrpc_1_1_templated_generic_stub.html">TemplatedGenericStub<grpc::ByteBuffer, grpc::ByteBuffer></a> <a class="code" href="namespacegrpc.html#ac44a8983b461983cc7a1d67119a606ac">GenericStub</a>;</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> } <span class="comment">// namespace grpc</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  </div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="preprocessor">#endif // GRPCPP_GENERIC_GENERIC_STUB_H</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_aeeb347bd31f2f5245227bac977b308bb"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#aeeb347bd31f2f5245227bac977b308bb">grpc::TemplatedGenericStub::UnaryCall</a></div><div class="ttdeci">void UnaryCall(ClientContext *context, const std::string &method, StubOptions options, const RequestType *request, ResponseType *response, std::function< void(grpc::Status)> on_completion)</div><div class="ttdoc">Setup and start a unary call to a named method method using context and specifying the request and re...</div><div class="ttdef"><b>Definition:</b> generic_stub.h:92</div></div>
|
|
<div class="ttc" id="anamespacegrpc_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 or invokes the user-provided ...</div><div class="ttdef"><b>Definition:</b> alarm.h:33</div></div>
|
|
<div class="ttc" id="agrpcpp_2support_2stub__options_8h_html"><div class="ttname"><a href="grpcpp_2support_2stub__options_8h.html">stub_options.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_client_unary_reactor_html"><div class="ttname"><a href="classgrpc_1_1_client_unary_reactor.html">grpc::ClientUnaryReactor</a></div><div class="ttdoc">ClientUnaryReactor is a reactor-style interface for a unary RPC.</div><div class="ttdef"><b>Definition:</b> client_callback.h:439</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1internal_1_1_client_callback_reader_writer_factory_html_aa9084bd495a274622783e408c1353a6d"><div class="ttname"><a href="classgrpc_1_1internal_1_1_client_callback_reader_writer_factory.html#aa9084bd495a274622783e408c1353a6d">grpc::internal::ClientCallbackReaderWriterFactory::Create</a></div><div class="ttdeci">static void Create(grpc::ChannelInterface *channel, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, ClientBidiReactor< Request, Response > *reactor)</div><div class="ttdef"><b>Definition:</b> client_callback.h:708</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_stub_options_html_a3c4ef89239f3228f33789a2d11d21ef3"><div class="ttname"><a href="classgrpc_1_1_stub_options.html#a3c4ef89239f3228f33789a2d11d21ef3">grpc::StubOptions::suffix_for_stats</a></div><div class="ttdeci">const char * suffix_for_stats() const</div><div class="ttdef"><b>Definition:</b> stub_options.h:34</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_ac304d65b478ea61991aa3e65430315cb"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#ac304d65b478ea61991aa3e65430315cb">grpc::TemplatedGenericStub::TemplatedGenericStub</a></div><div class="ttdeci">TemplatedGenericStub(std::shared_ptr< grpc::ChannelInterface > channel)</div><div class="ttdef"><b>Definition:</b> generic_stub.h:47</div></div>
|
|
<div class="ttc" id="anamespacegrpc_html_a7ee9bd108774bc00defacc5b4fb695df"><div class="ttname"><a href="namespacegrpc.html#a7ee9bd108774bc00defacc5b4fb695df">grpc::GenericClientAsyncResponseReader</a></div><div class="ttdeci">ClientAsyncResponseReader< ByteBuffer > GenericClientAsyncResponseReader</div><div class="ttdef"><b>Definition:</b> generic_stub.h:39</div></div>
|
|
<div class="ttc" id="anamespacegrpc_1_1internal_html_a86a4b381ea65c6fc72a334a0aff2b475"><div class="ttname"><a href="namespacegrpc_1_1internal.html#a86a4b381ea65c6fc72a334a0aff2b475">grpc::internal::CallbackUnaryCall</a></div><div class="ttdeci">void CallbackUnaryCall(grpc::ChannelInterface *channel, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, const InputMessage *request, OutputMessage *result, std::function< void(grpc::Status)> on_completion)</div><div class="ttdoc">Perform a callback-based unary call.</div><div class="ttdef"><b>Definition:</b> client_callback.h:50</div></div>
|
|
<div class="ttc" id="agrpcpp_2support_2status_8h_html"><div class="ttname"><a href="grpcpp_2support_2status_8h.html">status.h</a></div></div>
|
|
<div class="ttc" id="agrpcpp_2impl_2rpc__method_8h_html"><div class="ttname"><a href="grpcpp_2impl_2rpc__method_8h.html">rpc_method.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1internal_1_1_client_async_reader_writer_factory_html_ad3759cfa9f62989b1efb48e783e05886"><div class="ttname"><a href="classgrpc_1_1internal_1_1_client_async_reader_writer_factory.html#ad3759cfa9f62989b1efb48e783e05886">grpc::internal::ClientAsyncReaderWriterFactory::Create</a></div><div class="ttdeci">static ClientAsyncReaderWriter< W, R > * Create(grpc::ChannelInterface *channel, grpc::CompletionQueue *cq, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, bool start, void *tag)</div><div class="ttdoc">Create a stream object.</div><div class="ttdef"><b>Definition:</b> async_stream.h:495</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_stub_options_html"><div class="ttname"><a href="classgrpc_1_1_stub_options.html">grpc::StubOptions</a></div><div class="ttdoc">Useful interface for generated stubs.</div><div class="ttdef"><b>Definition:</b> stub_options.h:25</div></div>
|
|
<div class="ttc" id="asupport_2client__callback_8h_html"><div class="ttname"><a href="support_2client__callback_8h.html">client_callback.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_ac1043b3236bca92cf95ca165a66b105a"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#ac1043b3236bca92cf95ca165a66b105a">grpc::TemplatedGenericStub::PrepareBidiStreamingCall</a></div><div class="ttdeci">void PrepareBidiStreamingCall(ClientContext *context, const std::string &method, StubOptions options, ClientBidiReactor< RequestType, ResponseType > *reactor)</div><div class="ttdoc">Setup a call to a named method method using context and tied to reactor .</div><div class="ttdef"><b>Definition:</b> generic_stub.h:114</div></div>
|
|
<div class="ttc" id="aclassgrpc_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't, why?</div><div class="ttdef"><b>Definition:</b> status.h:35</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1internal_1_1_rpc_method_html_a40ce84e3569f6a327468ae59f04c7dd1a8308d189db6d81509042a321ac91b00f"><div class="ttname"><a href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a8308d189db6d81509042a321ac91b00f">grpc::internal::RpcMethod::BIDI_STREAMING</a></div><div class="ttdeci">@ BIDI_STREAMING</div><div class="ttdef"><b>Definition:</b> rpc_method.h:35</div></div>
|
|
<div class="ttc" id="aclassgrpc_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:193</div></div>
|
|
<div class="ttc" id="aclassgrpc_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> client_context.h:91</div></div>
|
|
<div class="ttc" id="anamespacegrpc_html_aba53fb6f2502caa167e9528e5c560539"><div class="ttname"><a href="namespacegrpc.html#aba53fb6f2502caa167e9528e5c560539">grpc::GenericClientAsyncReaderWriter</a></div><div class="ttdeci">ClientAsyncReaderWriter< ByteBuffer, ByteBuffer > GenericClientAsyncReaderWriter</div><div class="ttdef"><b>Definition:</b> generic_stub.h:35</div></div>
|
|
<div class="ttc" id="aclassgrpc_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:71</div></div>
|
|
<div class="ttc" id="agrpcpp_2support_2async__unary__call_8h_html"><div class="ttname"><a href="grpcpp_2support_2async__unary__call_8h.html">async_unary_call.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_a19737a9fe9dffdd0ac67f532f38d900f"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#a19737a9fe9dffdd0ac67f532f38d900f">grpc::TemplatedGenericStub::PrepareCall</a></div><div class="ttdeci">std::unique_ptr< ClientAsyncReaderWriter< RequestType, ResponseType > > PrepareCall(ClientContext *context, const std::string &method, grpc::CompletionQueue *cq)</div><div class="ttdoc">Setup a call to a named method method using context, but don't start it.</div><div class="ttdef"><b>Definition:</b> generic_stub.h:55</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_a7070aa80618833c3aaac58659eb80cdf"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#a7070aa80618833c3aaac58659eb80cdf">grpc::TemplatedGenericStub::PrepareUnaryCall</a></div><div class="ttdeci">void PrepareUnaryCall(ClientContext *context, const std::string &method, StubOptions options, const RequestType *request, ResponseType *response, ClientUnaryReactor *reactor)</div><div class="ttdoc">Setup a unary call to a named method method using context and specifying the request and response buf...</div><div class="ttdef"><b>Definition:</b> generic_stub.h:104</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1internal_1_1_rpc_method_html_a40ce84e3569f6a327468ae59f04c7dd1a73dbd8998b4364e284ade7c00a57ec37"><div class="ttname"><a href="classgrpc_1_1internal_1_1_rpc_method.html#a40ce84e3569f6a327468ae59f04c7dd1a73dbd8998b4364e284ade7c00a57ec37">grpc::internal::RpcMethod::NORMAL_RPC</a></div><div class="ttdeci">@ NORMAL_RPC</div><div class="ttdef"><b>Definition:</b> rpc_method.h:32</div></div>
|
|
<div class="ttc" id="agrpcpp_2client__context_8h_html"><div class="ttname"><a href="grpcpp_2client__context_8h.html">client_context.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html">grpc::TemplatedGenericStub</a></div><div class="ttdoc">Generic stubs provide a type-unaware interface to call gRPC methods by name.</div><div class="ttdef"><b>Definition:</b> generic_stub.h:45</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_client_async_reader_writer_html"><div class="ttname"><a href="classgrpc_1_1_client_async_reader_writer.html">grpc::ClientAsyncReaderWriter</a></div><div class="ttdoc">Async client-side interface for bi-directional streaming, where the outgoing message stream going to ...</div><div class="ttdef"><b>Definition:</b> client_context.h:89</div></div>
|
|
<div class="ttc" id="agrpcpp_2support_2byte__buffer_8h_html"><div class="ttname"><a href="grpcpp_2support_2byte__buffer_8h.html">byte_buffer.h</a></div></div>
|
|
<div class="ttc" id="anamespacegrpc_html_ac44a8983b461983cc7a1d67119a606ac"><div class="ttname"><a href="namespacegrpc.html#ac44a8983b461983cc7a1d67119a606ac">grpc::GenericStub</a></div><div class="ttdeci">TemplatedGenericStub< grpc::ByteBuffer, grpc::ByteBuffer > GenericStub</div><div class="ttdef"><b>Definition:</b> generic_stub.h:171</div></div>
|
|
<div class="ttc" id="aclassgrpc_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....</div><div class="ttdef"><b>Definition:</b> completion_queue.h:103</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_client_bidi_reactor_html"><div class="ttname"><a href="classgrpc_1_1_client_bidi_reactor.html">grpc::ClientBidiReactor</a></div><div class="ttdoc">ClientBidiReactor is the interface for a bidirectional streaming RPC.</div><div class="ttdef"><b>Definition:</b> client_callback.h:149</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1internal_1_1_rpc_method_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_rpc_method.html">grpc::internal::RpcMethod</a></div><div class="ttdoc">Descriptor of an RPC method.</div><div class="ttdef"><b>Definition:</b> rpc_method.h:29</div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_a8c868713afa718beb61f2cb79dfb8fa6"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#a8c868713afa718beb61f2cb79dfb8fa6">grpc::TemplatedGenericStub::Call</a></div><div class="ttdeci">std::unique_ptr< ClientAsyncReaderWriter< RequestType, ResponseType > > Call(ClientContext *context, const std::string &method, grpc::CompletionQueue *cq, void *tag)</div><div class="ttdoc">DEPRECATED for multi-threaded use Begin a call to a named method method using context.</div><div class="ttdef"><b>Definition:</b> generic_stub.h:83</div></div>
|
|
<div class="ttc" id="agrpcpp_2support_2async__stream_8h_html"><div class="ttname"><a href="grpcpp_2support_2async__stream_8h.html">async_stream.h</a></div></div>
|
|
<div class="ttc" id="aclassgrpc_1_1_templated_generic_stub_html_aee40f32f1aca95867d805205a17e6ffc"><div class="ttname"><a href="classgrpc_1_1_templated_generic_stub.html#aee40f32f1aca95867d805205a17e6ffc">grpc::TemplatedGenericStub::PrepareUnaryCall</a></div><div class="ttdeci">std::unique_ptr< ClientAsyncResponseReader< ResponseType > > PrepareUnaryCall(ClientContext *context, const std::string &method, const RequestType &request, grpc::CompletionQueue *cq)</div><div class="ttdoc">Setup a unary call to a named method method using context, and don't start it.</div><div class="ttdef"><b>Definition:</b> generic_stub.h:65</div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Wed Sep 6 2023 16:09:16 for GRPC C++ by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|