295 lines
15 KiB
HTML
295 lines
15 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++: grpc::ServerAsyncResponseWriter< W > Class Template Reference</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="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_server_async_response_writer.html">ServerAsyncResponseWriter</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">grpc::ServerAsyncResponseWriter< W > Class Template Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Async server-side API for handling unary calls, where the single response message sent to the client is of type <em>W</em>.
|
|
<a href="classgrpc_1_1_server_async_response_writer.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="grpcpp_2server__context_8h_source.html">server_context.h</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a22cb95d07a8e365eb4a14a10dced5975"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#a22cb95d07a8e365eb4a14a10dced5975">ServerAsyncResponseWriter</a> (<a class="el" href="classgrpc_1_1_server_context.html">grpc::ServerContext</a> *ctx)</td></tr>
|
|
<tr class="separator:a22cb95d07a8e365eb4a14a10dced5975"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a451ba3cd9093168a6becd137b1720834"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">SendInitialMetadata</a> (void *tag) override</td></tr>
|
|
<tr class="memdesc:a451ba3cd9093168a6becd137b1720834"><td class="mdescLeft"> </td><td class="mdescRight">See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. <a href="classgrpc_1_1_server_async_response_writer.html#a451ba3cd9093168a6becd137b1720834">More...</a><br /></td></tr>
|
|
<tr class="separator:a451ba3cd9093168a6becd137b1720834"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a15d487147beb4fa08759775d6e264fa8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#a15d487147beb4fa08759775d6e264fa8">Finish</a> (const W &msg, const <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &status, void *tag)</td></tr>
|
|
<tr class="memdesc:a15d487147beb4fa08759775d6e264fa8"><td class="mdescLeft"> </td><td class="mdescRight">Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call. <a href="classgrpc_1_1_server_async_response_writer.html#a15d487147beb4fa08759775d6e264fa8">More...</a><br /></td></tr>
|
|
<tr class="separator:a15d487147beb4fa08759775d6e264fa8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab55a9677c391aa90bcf511a0ed1c3ded"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_server_async_response_writer.html#ab55a9677c391aa90bcf511a0ed1c3ded">FinishWithError</a> (const <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &status, void *tag)</td></tr>
|
|
<tr class="memdesc:ab55a9677c391aa90bcf511a0ed1c3ded"><td class="mdescLeft"> </td><td class="mdescRight">Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call. <a href="classgrpc_1_1_server_async_response_writer.html#ab55a9677c391aa90bcf511a0ed1c3ded">More...</a><br /></td></tr>
|
|
<tr class="separator:ab55a9677c391aa90bcf511a0ed1c3ded"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><h3>template<class W><br />
|
|
class grpc::ServerAsyncResponseWriter< W ></h3>
|
|
|
|
<p>Async server-side API for handling unary calls, where the single response message sent to the client is of type <em>W</em>. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a22cb95d07a8e365eb4a14a10dced5975"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a22cb95d07a8e365eb4a14a10dced5975">◆ </a></span>ServerAsyncResponseWriter()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class W > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>< W >::<a class="el" href="classgrpc_1_1_server_async_response_writer.html">ServerAsyncResponseWriter</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classgrpc_1_1_server_context.html">grpc::ServerContext</a> * </td>
|
|
<td class="paramname"><em>ctx</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a15d487147beb4fa08759775d6e264fa8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a15d487147beb4fa08759775d6e264fa8">◆ </a></span>Finish()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class W > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>< W >::Finish </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const W & </td>
|
|
<td class="paramname"><em>msg</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> & </td>
|
|
<td class="paramname"><em>status</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>tag</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call. </p>
|
|
<p>Should not be used concurrently with other operations.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>To be sent to the client as the result of the call. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Message to be sent to the client.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Side effect:</p><ul>
|
|
<li>also sends initial metadata if not already sent (using the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with this call).</li>
|
|
</ul>
|
|
<p>Note: if <em>status</em> has a non-OK code, then <em>msg</em> will not be sent, and the client will receive only the status with possible trailing metadata.</p>
|
|
<p>gRPC doesn't take ownership or a reference to msg and status, so it is safe to deallocate them once the Finish operation is complete (i.e. a result arrives in the completion queue). </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab55a9677c391aa90bcf511a0ed1c3ded"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab55a9677c391aa90bcf511a0ed1c3ded">◆ </a></span>FinishWithError()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class W > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>< W >::FinishWithError </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> & </td>
|
|
<td class="paramname"><em>status</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>tag</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call. </p>
|
|
<p>Should not be used concurrently with other operations.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>To be sent to the client as the result of the call.<ul>
|
|
<li>Note: <em>status</em> must have a non-OK code.</li>
|
|
</ul>
|
|
</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Side effect:</p><ul>
|
|
<li>also sends initial metadata if not already sent (using the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with this call).</li>
|
|
</ul>
|
|
<p>gRPC doesn't take ownership or a reference to status, so it is safe to deallocate them once the Finish operation is complete (i.e. a result arrives in the completion queue). </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a451ba3cd9093168a6becd137b1720834"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a451ba3cd9093168a6becd137b1720834">◆ </a></span>SendInitialMetadata()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class W > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classgrpc_1_1_server_async_response_writer.html">grpc::ServerAsyncResponseWriter</a>< W >::SendInitialMetadata </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>tag</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. </p>
|
|
<p>Side effect: The initial metadata that will be sent to the client from this op will be taken from the <em><a class="el" href="classgrpc_1_1_server_context.html" title="A ServerContext or CallbackServerContext allows the code implementing a service handler to:">ServerContext</a></em> associated with the call.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>Tag identifying this request. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>include/grpcpp/<a class="el" href="grpcpp_2server__context_8h_source.html">server_context.h</a></li>
|
|
<li>include/grpcpp/support/<a class="el" href="grpcpp_2support_2async__unary__call_8h_source.html">async_unary_call.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- 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>
|