grpc/cpp/grpc__posix_8h.html

181 lines
9.7 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/grpc/grpc_posix.h File 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.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&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="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.html">grpc</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">grpc_posix.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="support_2port__platform_8h_source.html">grpc/support/port_platform.h</a>&gt;</code><br />
<code>#include &lt;stddef.h&gt;</code><br />
<code>#include &lt;<a class="el" href="grpc_8h_source.html">grpc/grpc.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="grpc__types_8h_source.html">grpc/impl/grpc_types.h</a>&gt;</code><br />
</div>
<p><a href="grpc__posix_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac58a0ae9980f725a803651123bdf4382"><td class="memItemLeft" align="right" valign="top"><a class="el" href="support_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="el" href="grpc__types_8h.html#a432bfa6b9f6603643cdf9de8804c254e">grpc_channel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grpc__posix_8h.html#ac58a0ae9980f725a803651123bdf4382">grpc_channel_create_from_fd</a> (const char *target, int fd, <a class="el" href="grpc_8h.html#ab4ed40ea84a2f70ffd81a84bd8ee634b">grpc_channel_credentials</a> *creds, const <a class="el" href="structgrpc__channel__args.html">grpc_channel_args</a> *args)</td></tr>
<tr class="memdesc:ac58a0ae9980f725a803651123bdf4382"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a secure channel to 'target' using file descriptor 'fd' and passed-in credentials. <a href="grpc__posix_8h.html#ac58a0ae9980f725a803651123bdf4382">More...</a><br /></td></tr>
<tr class="separator:ac58a0ae9980f725a803651123bdf4382"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d6e9cceffeb7796877341b5818ccc1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="support_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grpc__posix_8h.html#a5d6e9cceffeb7796877341b5818ccc1d">grpc_server_add_channel_from_fd</a> (<a class="el" href="grpc__types_8h.html#a2bbbaad8f7a806f6c834b68c5dd916d8">grpc_server</a> *server, int fd, <a class="el" href="grpc_8h.html#aa724192e56fdc03827846f16752deccc">grpc_server_credentials</a> *creds)</td></tr>
<tr class="memdesc:a5d6e9cceffeb7796877341b5818ccc1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add the connected secure communication channel based on file descriptor 'fd' to the 'server' and server credentials 'creds'. <a href="grpc__posix_8h.html#a5d6e9cceffeb7796877341b5818ccc1d">More...</a><br /></td></tr>
<tr class="separator:a5d6e9cceffeb7796877341b5818ccc1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ac58a0ae9980f725a803651123bdf4382"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac58a0ae9980f725a803651123bdf4382">&#9670;&nbsp;</a></span>grpc_channel_create_from_fd()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="support_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="el" href="grpc__types_8h.html#a432bfa6b9f6603643cdf9de8804c254e">grpc_channel</a>* grpc_channel_create_from_fd </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="grpc_8h.html#ab4ed40ea84a2f70ffd81a84bd8ee634b">grpc_channel_credentials</a> *&#160;</td>
<td class="paramname"><em>creds</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structgrpc__channel__args.html">grpc_channel_args</a> *&#160;</td>
<td class="paramname"><em>args</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a secure channel to 'target' using file descriptor 'fd' and passed-in credentials. </p>
<p>The 'target' argument will be used to indicate the name for this channel. Note that this API currently only supports insecure channel credentials. Using other types of credentials will result in a failure. </p>
</div>
</div>
<a id="a5d6e9cceffeb7796877341b5818ccc1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d6e9cceffeb7796877341b5818ccc1d">&#9670;&nbsp;</a></span>grpc_server_add_channel_from_fd()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="support_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void grpc_server_add_channel_from_fd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="grpc__types_8h.html#a2bbbaad8f7a806f6c834b68c5dd916d8">grpc_server</a> *&#160;</td>
<td class="paramname"><em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="grpc_8h.html#aa724192e56fdc03827846f16752deccc">grpc_server_credentials</a> *&#160;</td>
<td class="paramname"><em>creds</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add the connected secure communication channel based on file descriptor 'fd' to the 'server' and server credentials 'creds'. </p>
<p>The 'fd' must be an open file descriptor corresponding to a connected socket. Events from the file descriptor may come on any of the server completion queues (i.e completion queues registered via the grpc_server_register_completion_queue API). Note that this API currently only supports inseure server credentials Using other types of credentials will result in a failure. TODO(hork): add channel_args to this API to allow endpoints and transports created in this function to participate in the resource quota feature. </p>
</div>
</div>
</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 &#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>