grpc/cpp/classgrpc_1_1internal_1_1_w...

275 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GRPC C++: grpc::internal::WriterInterface&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.22.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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="namespacegrpc_1_1internal.html">internal</a></li><li class="navelem"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">WriterInterface</a></li> </ul>
</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::internal::WriterInterface&lt; W &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An interface that can be fed a sequence of messages of type <em>W</em>.
<a href="classgrpc_1_1internal_1_1_writer_interface.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="grpcpp_2impl_2codegen_2sync__stream_8h_source.html">sync_stream.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:a0f3bb9c5625b43d600d33d2bf8c17b60"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a0f3bb9c5625b43d600d33d2bf8c17b60">~WriterInterface</a> ()</td></tr>
<tr class="separator:a0f3bb9c5625b43d600d33d2bf8c17b60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add3e3940ba338ab08705ea69d017a80b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#add3e3940ba338ab08705ea69d017a80b">Write</a> (const W &amp;msg, <a class="el" href="classgrpc_1_1_write_options.html">WriteOptions</a> options)=0</td></tr>
<tr class="memdesc:add3e3940ba338ab08705ea69d017a80b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block to write <em>msg</em> to the stream with <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> <em>options</em>. <a href="#add3e3940ba338ab08705ea69d017a80b">More...</a><br /></td></tr>
<tr class="separator:add3e3940ba338ab08705ea69d017a80b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d051f5c00ede4469cfb216bd05b594"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a89d051f5c00ede4469cfb216bd05b594">Write</a> (const W &amp;msg)</td></tr>
<tr class="memdesc:a89d051f5c00ede4469cfb216bd05b594"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block to write <em>msg</em> to the stream with default write options. <a href="#a89d051f5c00ede4469cfb216bd05b594">More...</a><br /></td></tr>
<tr class="separator:a89d051f5c00ede4469cfb216bd05b594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3308bfe1558e317e5fa3530f74c63ce6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html#a3308bfe1558e317e5fa3530f74c63ce6">WriteLast</a> (const W &amp;msg, <a class="el" href="classgrpc_1_1_write_options.html">WriteOptions</a> options)</td></tr>
<tr class="memdesc:a3308bfe1558e317e5fa3530f74c63ce6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write <em>msg</em> and coalesce it with the writing of trailing metadata, using <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> <em>options</em>. <a href="#a3308bfe1558e317e5fa3530f74c63ce6">More...</a><br /></td></tr>
<tr class="separator:a3308bfe1558e317e5fa3530f74c63ce6"><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::internal::WriterInterface&lt; W &gt;</h3>
<p>An interface that can be fed a sequence of messages of type <em>W</em>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0f3bb9c5625b43d600d33d2bf8c17b60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f3bb9c5625b43d600d33d2bf8c17b60">&#9670;&nbsp;</a></span>~WriterInterface()</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">virtual <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::~<a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">WriterInterface</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="add3e3940ba338ab08705ea69d017a80b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add3e3940ba338ab08705ea69d017a80b">&#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">virtual bool <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</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">WriteOptions</a>&#160;</td>
<td class="paramname"><em>options</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">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Block to write <em>msg</em> to the stream with <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> <em>options</em>. </p>
<p>This is thread-safe with respect to <em><a class="el" href="classgrpc_1_1internal_1_1_reader_interface.html#adfb50ace59b4b9666a46548d3f732ee8" title="Block to read a message and parse to msg. ">ReaderInterface::Read</a></em> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message to be written to the stream. </td></tr>
<tr><td class="paramname">options</td><td>The <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> affecting the write operation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><em>true</em> on success, <em>false</em> when the stream has been closed. </dd></dl>
<p>Implemented in <a class="el" href="classgrpc_1_1_server_split_streamer.html#a3dbab04817791c65c8222daee9f6f46f">grpc::ServerSplitStreamer&lt; RequestType, ResponseType &gt;</a>, <a class="el" href="classgrpc_1_1_server_unary_streamer.html#a68d093b4506bfcac59f5996157867d62">grpc::ServerUnaryStreamer&lt; RequestType, ResponseType &gt;</a>, <a class="el" href="classgrpc_1_1_server_reader_writer.html#a12e60107e7b98f024903d56e7be8e6af">grpc::ServerReaderWriter&lt; W, R &gt;</a>, <a class="el" href="classgrpc_1_1_server_writer.html#a877af2459a53cf8cdbff0952748594f8">grpc::ServerWriter&lt; W &gt;</a>, <a class="el" href="classgrpc_1_1_client_reader_writer.html#ae30b0e18622f4132b1c7654e24605d53">grpc::ClientReaderWriter&lt; W, R &gt;</a>, and <a class="el" href="classgrpc_1_1_client_writer.html#ad6b1906d4f9cb0a14431aeb310e6674b">grpc::ClientWriter&lt; W &gt;</a>.</p>
</div>
</div>
<a id="a89d051f5c00ede4469cfb216bd05b594"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89d051f5c00ede4469cfb216bd05b594">&#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">bool <a class="el" href="classgrpc_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::Write </td>
<td>(</td>
<td class="paramtype">const W &amp;&#160;</td>
<td class="paramname"><em>msg</em></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>Block to write <em>msg</em> to the stream with default write options. </p>
<p>This is thread-safe with respect to <em><a class="el" href="classgrpc_1_1internal_1_1_reader_interface.html#adfb50ace59b4b9666a46548d3f732ee8" title="Block to read a message and parse to msg. ">ReaderInterface::Read</a></em> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message to be written to the stream.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><em>true</em> on success, <em>false</em> when the stream has been closed. </dd></dl>
</div>
</div>
<a id="a3308bfe1558e317e5fa3530f74c63ce6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3308bfe1558e317e5fa3530f74c63ce6">&#9670;&nbsp;</a></span>WriteLast()</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_1_1internal_1_1_writer_interface.html">grpc::internal::WriterInterface</a>&lt; W &gt;::WriteLast </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">WriteOptions</a>&#160;</td>
<td class="paramname"><em>options</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> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Write <em>msg</em> and coalesce it with the writing of trailing metadata, using <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> <em>options</em>. </p>
<p>For client, WriteLast is equivalent of performing Write and WritesDone in a single step. <em>msg</em> and trailing metadata are coalesced and sent on wire by calling this function. For server, WriteLast buffers the <em>msg</em>. The writing of <em>msg</em> is held until the service handler returns, where <em>msg</em> and trailing metadata are coalesced and sent on wire. Note that WriteLast can only buffer <em>msg</em> up to the flow control window size. If <em>msg</em> size is larger than the window size, it will be sent on wire without buffering.</p>
<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 to the stream. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>The <a class="el" href="classgrpc_1_1_write_options.html" title="Per-message write options. ">WriteOptions</a> to be used to write this message. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/grpcpp/impl/codegen/<a class="el" href="grpcpp_2impl_2codegen_2sync__stream_8h_source.html">sync_stream.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 3 2019 14:51:27 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>