grpc/cpp/classgrpc__impl_1_1_server_...

413 lines
25 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_impl::ServerAsyncWriter&lt; W &gt; 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++
&#160;<span id="projectnumber">1.31.1</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&amp;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&amp;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__impl.html">grpc_impl</a></li><li class="navelem"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html">ServerAsyncWriter</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_impl::ServerAsyncWriter&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type <em>W</em>.
<a href="classgrpc__impl_1_1_server_async_writer.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="impl_2codegen_2async__stream__impl_8h_source.html">async_stream_impl.h</a>&gt;</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:afe3147c83e047b4c4662fd5c289b9df2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#afe3147c83e047b4c4662fd5c289b9df2">ServerAsyncWriter</a> (::<a class="el" href="classgrpc__impl_1_1_server_context.html">grpc_impl::ServerContext</a> *ctx)</td></tr>
<tr class="separator:afe3147c83e047b4c4662fd5c289b9df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad286d4e160c63568154af47034e1880e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#ad286d4e160c63568154af47034e1880e">SendInitialMetadata</a> (void *tag) override</td></tr>
<tr class="memdesc:ad286d4e160c63568154af47034e1880e"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. <a href="classgrpc__impl_1_1_server_async_writer.html#ad286d4e160c63568154af47034e1880e">More...</a><br /></td></tr>
<tr class="separator:ad286d4e160c63568154af47034e1880e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05daf326ddaeee486dcd771b69329b98"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a05daf326ddaeee486dcd771b69329b98">Write</a> (const W &amp;msg, void *tag) override</td></tr>
<tr class="memdesc:a05daf326ddaeee486dcd771b69329b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> with identifying tag <em>tag</em>. <a href="classgrpc__impl_1_1_server_async_writer.html#a05daf326ddaeee486dcd771b69329b98">More...</a><br /></td></tr>
<tr class="separator:a05daf326ddaeee486dcd771b69329b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbd407cad4ebfbfe199fad243e130c9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#afbd407cad4ebfbfe199fad243e130c9e">Write</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag) override</td></tr>
<tr class="memdesc:afbd407cad4ebfbfe199fad243e130c9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> using WriteOptions <em>options</em> with identifying tag <em>tag</em>. <a href="classgrpc__impl_1_1_server_async_writer.html#afbd407cad4ebfbfe199fad243e130c9e">More...</a><br /></td></tr>
<tr class="separator:afbd407cad4ebfbfe199fad243e130c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85bb275404d45a0a3bfcd53e7b44593e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a85bb275404d45a0a3bfcd53e7b44593e">WriteAndFinish</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag) override</td></tr>
<tr class="memdesc:a85bb275404d45a0a3bfcd53e7b44593e"><td class="mdescLeft">&#160;</td><td class="mdescRight">See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912" title="Request the writing of msg and coalesce it with trailing metadata which contains status,...">ServerAsyncWriterInterface.WriteAndFinish</a></em> method for semantics. <a href="classgrpc__impl_1_1_server_async_writer.html#a85bb275404d45a0a3bfcd53e7b44593e">More...</a><br /></td></tr>
<tr class="separator:a85bb275404d45a0a3bfcd53e7b44593e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92ff8de396fb2b647e801b0d0f474c2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html#a92ff8de396fb2b647e801b0d0f474c2b">Finish</a> (const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;status, void *tag) override</td></tr>
<tr class="memdesc:a92ff8de396fb2b647e801b0d0f474c2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd" title="Indicate that the stream is to be finished with a certain status code.">ServerAsyncWriterInterface.Finish</a></em> method for semantics. <a href="classgrpc__impl_1_1_server_async_writer.html#a92ff8de396fb2b647e801b0d0f474c2b">More...</a><br /></td></tr>
<tr class="separator:a92ff8de396fb2b647e801b0d0f474c2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html">grpc::internal::ServerAsyncStreamingInterface</a></td></tr>
<tr class="memitem:aeace2295f3792ce24975361c300d641a inherit pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html#aeace2295f3792ce24975361c300d641a">~ServerAsyncStreamingInterface</a> ()</td></tr>
<tr class="separator:aeace2295f3792ce24975361c300d641a inherit pub_methods_classgrpc_1_1internal_1_1_server_async_streaming_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a></td></tr>
<tr class="memitem:abb8fa894b94e09e9a2b6ca261a20ec8b inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#abb8fa894b94e09e9a2b6ca261a20ec8b">~AsyncWriterInterface</a> ()</td></tr>
<tr class="separator:abb8fa894b94e09e9a2b6ca261a20ec8b inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a05ab1b1965def7cec0324fe27b0fa67f">WriteLast</a> (const W &amp;msg, ::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a> options, void *tag)</td></tr>
<tr class="memdesc:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request the writing of <em>msg</em> and coalesce it with the writing of trailing metadata, using WriteOptions <em>options</em> with identifying tag <em>tag</em>. <a href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a05ab1b1965def7cec0324fe27b0fa67f">More...</a><br /></td></tr>
<tr class="separator:a05ab1b1965def7cec0324fe27b0fa67f inherit pub_methods_classgrpc__impl_1_1internal_1_1_async_writer_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class W&gt;<br />
class grpc_impl::ServerAsyncWriter&lt; W &gt;</h3>
<p>Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type <em>W</em>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="afe3147c83e047b4c4662fd5c289b9df2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3147c83e047b4c4662fd5c289b9df2">&#9670;&nbsp;</a></span>ServerAsyncWriter()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::<a class="el" href="classgrpc__impl_1_1_server_async_writer.html">ServerAsyncWriter</a> </td>
<td>(</td>
<td class="paramtype">::<a class="el" href="classgrpc__impl_1_1_server_context.html">grpc_impl::ServerContext</a> *&#160;</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="a92ff8de396fb2b647e801b0d0f474c2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92ff8de396fb2b647e801b0d0f474c2b">&#9670;&nbsp;</a></span>Finish()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Finish </td>
<td>(</td>
<td class="paramtype">const ::<a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> &amp;&#160;</td>
<td class="paramname"><em>status</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>tag</em>&#160;</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 class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd" title="Indicate that the stream is to be finished with a certain status code.">ServerAsyncWriterInterface.Finish</a></em> method for semantics. </p>
<p>Implicit input parameter:</p><ul>
<li>the <em><a class="el" href="classgrpc__impl_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 is used for sending trailing (and initial if not already sent) metadata to the client.</li>
</ul>
<p>Note: there are no restrictions are the code of <em>status</em>,it may be non-OK</p>
<p>gRPC doesn't take ownership or a reference to <em>status</em>, so it is safe to to deallocate once Finish returns. </p>
<p>Implements <a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#a6683f8dfe66786b7d8de4466ea0908cd">grpc_impl::ServerAsyncWriterInterface&lt; W &gt;</a>.</p>
</div>
</div>
<a id="ad286d4e160c63568154af47034e1880e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad286d4e160c63568154af47034e1880e">&#9670;&nbsp;</a></span>SendInitialMetadata()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::SendInitialMetadata </td>
<td>(</td>
<td class="paramtype">void *&#160;</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 class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>See <em>ServerAsyncStreamingInterface::SendInitialMetadata</em> for semantics. </p>
<p>Implicit input parameter:</p><ul>
<li>The initial metadata that will be sent to the client from this op will be taken from the <em><a class="el" href="classgrpc__impl_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.</li>
</ul>
<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>
<p>Implements <a class="el" href="classgrpc_1_1internal_1_1_server_async_streaming_interface.html#ac55759faf2283db8bf716183881efe01">grpc::internal::ServerAsyncStreamingInterface</a>.</p>
</div>
</div>
<a id="afbd407cad4ebfbfe199fad243e130c9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbd407cad4ebfbfe199fad243e130c9e">&#9670;&nbsp;</a></span>Write() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Write </td>
<td>(</td>
<td class="paramtype">const W &amp;&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
<td class="paramname"><em>options</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>tag</em>&#160;</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 class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Request the writing of <em>msg</em> using WriteOptions <em>options</em> with identifying tag <em>tag</em>. </p>
<p>Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive <em>tag</em> from the completion queue BEFORE calling Write again. WriteOptions <em>options</em> is used to set the write options of this message. This is thread-safe with respect to <em>AsyncReaderInterface::Read</em> </p>
<p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The WriteOptions to be used to write this message. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a8b008c0685622ae659f8a57fb508bb5b">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a>.</p>
</div>
</div>
<a id="a05daf326ddaeee486dcd771b69329b98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05daf326ddaeee486dcd771b69329b98">&#9670;&nbsp;</a></span>Write() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::Write </td>
<td>(</td>
<td class="paramtype">const W &amp;&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>tag</em>&#160;</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 class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Request the writing of <em>msg</em> with identifying tag <em>tag</em>. </p>
<p>Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive <em>tag</em> from the completion queue BEFORE calling Write again. This is thread-safe with respect to <em>AsyncReaderInterface::Read</em> </p>
<p>gRPC doesn't take ownership or a reference to <em>msg</em>, so it is safe to to deallocate once Write returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message to be written. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>The tag identifying the operation. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classgrpc__impl_1_1internal_1_1_async_writer_interface.html#a9c4e4ce91569478b6656992a35c5ece1">grpc_impl::internal::AsyncWriterInterface&lt; W &gt;</a>.</p>
</div>
</div>
<a id="a85bb275404d45a0a3bfcd53e7b44593e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85bb275404d45a0a3bfcd53e7b44593e">&#9670;&nbsp;</a></span>WriteAndFinish()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class W &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classgrpc__impl_1_1_server_async_writer.html">grpc_impl::ServerAsyncWriter</a>&lt; W &gt;::WriteAndFinish </td>
<td>(</td>
<td class="paramtype">const W &amp;&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">::<a class="el" href="classgrpc_1_1_write_options.html">grpc::WriteOptions</a>&#160;</td>
<td class="paramname"><em>options</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> &amp;&#160;</td>
<td class="paramname"><em>status</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>tag</em>&#160;</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 class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>See the <em><a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912" title="Request the writing of msg and coalesce it with trailing metadata which contains status,...">ServerAsyncWriterInterface.WriteAndFinish</a></em> method for semantics. </p>
<p>Implicit input parameter:</p><ul>
<li>the <em><a class="el" href="classgrpc__impl_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 is used for sending trailing (and initial) metadata to the client.</li>
</ul>
<p>Note: <em>status</em> must have an OK code.</p>
<p>gRPC doesn't take ownership or a reference to <em>msg</em> and <em>status</em>, so it is safe to deallocate once WriteAndFinish returns. </p>
<p>Implements <a class="el" href="classgrpc__impl_1_1_server_async_writer_interface.html#af457dc1e137016870f17e7c60dd3d912">grpc_impl::ServerAsyncWriterInterface&lt; W &gt;</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/grpcpp/impl/codegen/<a class="el" href="impl_2codegen_2async__stream__impl_8h_source.html">async_stream_impl.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 18 2020 16:24:48 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>