class_grpc_1_1_channel.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC PHP: Grpc\Channel Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC PHP
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. <div id="nav-path" class="navpath">
  62. <ul>
  63. <li class="navelem"><a class="el" href="namespace_grpc.html">Grpc</a></li><li class="navelem"><a class="el" href="class_grpc_1_1_channel.html">Channel</a></li> </ul>
  64. </div>
  65. </div><!-- top -->
  66. <div class="header">
  67. <div class="summary">
  68. <a href="#pub-methods">Public Member Functions</a> </div>
  69. <div class="headertitle">
  70. <div class="title">Grpc\Channel Class Reference</div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>class <a class="el" href="class_grpc_1_1_channel.html" title="class Channel">Channel</a>
  74. <a href="class_grpc_1_1_channel.html#details">More...</a></p>
  75. <table class="memberdecls">
  76. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  77. Public Member Functions</h2></td></tr>
  78. <tr class="memitem:aa9cf4f79b071b277c297cbd2da31aff2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grpc_1_1_channel.html#aa9cf4f79b071b277c297cbd2da31aff2">__construct</a> ($target, $args_array)</td></tr>
  79. <tr class="memdesc:aa9cf4f79b071b277c297cbd2da31aff2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an instance of the <a class="el" href="class_grpc_1_1_channel.html" title="class Channel">Channel</a> class. <a href="class_grpc_1_1_channel.html#aa9cf4f79b071b277c297cbd2da31aff2">More...</a><br /></td></tr>
  80. <tr class="separator:aa9cf4f79b071b277c297cbd2da31aff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:afce31d39c37f42d29cae7c5fbd5279d9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grpc_1_1_channel.html#afce31d39c37f42d29cae7c5fbd5279d9">getTarget</a> ()</td></tr>
  82. <tr class="memdesc:afce31d39c37f42d29cae7c5fbd5279d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the endpoint this call/stream is connected to. <a href="class_grpc_1_1_channel.html#afce31d39c37f42d29cae7c5fbd5279d9">More...</a><br /></td></tr>
  83. <tr class="separator:afce31d39c37f42d29cae7c5fbd5279d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:a64f6c766e8d06e6d78c01c37de28f8d7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grpc_1_1_channel.html#a64f6c766e8d06e6d78c01c37de28f8d7">getConnectivityState</a> ($try_to_connect)</td></tr>
  85. <tr class="memdesc:a64f6c766e8d06e6d78c01c37de28f8d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the connectivity state of the channel. <a href="class_grpc_1_1_channel.html#a64f6c766e8d06e6d78c01c37de28f8d7">More...</a><br /></td></tr>
  86. <tr class="separator:a64f6c766e8d06e6d78c01c37de28f8d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:a2ef0546000edb6aba1f8e0233a75b10d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grpc_1_1_channel.html#a2ef0546000edb6aba1f8e0233a75b10d">watchConnectivityState</a> ($last_state, $deadline_obj)</td></tr>
  88. <tr class="memdesc:a2ef0546000edb6aba1f8e0233a75b10d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Watch the connectivity state of the channel until it changed. <a href="class_grpc_1_1_channel.html#a2ef0546000edb6aba1f8e0233a75b10d">More...</a><br /></td></tr>
  89. <tr class="separator:a2ef0546000edb6aba1f8e0233a75b10d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a7475fd9110ae535b303cb37f8b217356"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grpc_1_1_channel.html#a7475fd9110ae535b303cb37f8b217356">close</a> ()</td></tr>
  91. <tr class="memdesc:a7475fd9110ae535b303cb37f8b217356"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the channel. <a href="class_grpc_1_1_channel.html#a7475fd9110ae535b303cb37f8b217356">More...</a><br /></td></tr>
  92. <tr class="separator:a7475fd9110ae535b303cb37f8b217356"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table>
  94. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  95. <div class="textblock"><p>class <a class="el" href="class_grpc_1_1_channel.html" title="class Channel">Channel</a> </p>
  96. <dl class="section see"><dt>See also</dt><dd><a href="https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/channel.c">https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/channel.c</a> </dd></dl>
  97. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  98. <a id="aa9cf4f79b071b277c297cbd2da31aff2"></a>
  99. <h2 class="memtitle"><span class="permalink"><a href="#aa9cf4f79b071b277c297cbd2da31aff2">&#9670;&nbsp;</a></span>__construct()</h2>
  100. <div class="memitem">
  101. <div class="memproto">
  102. <table class="memname">
  103. <tr>
  104. <td class="memname">Grpc\Channel::__construct </td>
  105. <td>(</td>
  106. <td class="paramtype">&#160;</td>
  107. <td class="paramname"><em>$target</em>, </td>
  108. </tr>
  109. <tr>
  110. <td class="paramkey"></td>
  111. <td></td>
  112. <td class="paramtype">&#160;</td>
  113. <td class="paramname"><em>$args_array</em>&#160;</td>
  114. </tr>
  115. <tr>
  116. <td></td>
  117. <td>)</td>
  118. <td></td><td></td>
  119. </tr>
  120. </table>
  121. </div><div class="memdoc">
  122. <p>Construct an instance of the <a class="el" href="class_grpc_1_1_channel.html" title="class Channel">Channel</a> class. </p>
  123. <p>By default, the underlying grpc_channel is "persistent". That is, given the same set of parameters passed to the constructor, the same underlying grpc_channel will be returned.</p>
  124. <p>If the $args array contains a "credentials" key mapping to a <a class="el" href="class_grpc_1_1_channel_credentials.html" title="class ChannelCredentials">ChannelCredentials</a> object, a secure channel will be created with those credentials.</p>
  125. <p>If the $args array contains a "force_new" key mapping to a boolean value of "true", a new and separate underlying grpc_channel will be created and returned. This will not affect existing channels.</p>
  126. <dl class="params"><dt>Parameters</dt><dd>
  127. <table class="params">
  128. <tr><td class="paramtype">string</td><td class="paramname">$target</td><td>The hostname to associate with this channel </td></tr>
  129. <tr><td class="paramtype">array</td><td class="paramname">$args_array</td><td>The arguments to pass to the <a class="el" href="class_grpc_1_1_channel.html" title="class Channel">Channel</a> </td></tr>
  130. </table>
  131. </dd>
  132. </dl>
  133. </div>
  134. </div>
  135. <h2 class="groupheader">Member Function Documentation</h2>
  136. <a id="a7475fd9110ae535b303cb37f8b217356"></a>
  137. <h2 class="memtitle"><span class="permalink"><a href="#a7475fd9110ae535b303cb37f8b217356">&#9670;&nbsp;</a></span>close()</h2>
  138. <div class="memitem">
  139. <div class="memproto">
  140. <table class="memname">
  141. <tr>
  142. <td class="memname">Grpc\Channel::close </td>
  143. <td>(</td>
  144. <td class="paramname"></td><td>)</td>
  145. <td></td>
  146. </tr>
  147. </table>
  148. </div><div class="memdoc">
  149. <p>Close the channel. </p>
  150. <dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
  151. </div>
  152. </div>
  153. <a id="a64f6c766e8d06e6d78c01c37de28f8d7"></a>
  154. <h2 class="memtitle"><span class="permalink"><a href="#a64f6c766e8d06e6d78c01c37de28f8d7">&#9670;&nbsp;</a></span>getConnectivityState()</h2>
  155. <div class="memitem">
  156. <div class="memproto">
  157. <table class="memname">
  158. <tr>
  159. <td class="memname">Grpc\Channel::getConnectivityState </td>
  160. <td>(</td>
  161. <td class="paramtype">&#160;</td>
  162. <td class="paramname"><em>$try_to_connect</em></td><td>)</td>
  163. <td></td>
  164. </tr>
  165. </table>
  166. </div><div class="memdoc">
  167. <p>Get the connectivity state of the channel. </p>
  168. <dl class="params"><dt>Parameters</dt><dd>
  169. <table class="params">
  170. <tr><td class="paramtype">bool</td><td class="paramname">$try_to_connect</td><td>Try to connect on the channel (optional) </td></tr>
  171. </table>
  172. </dd>
  173. </dl>
  174. <dl class="section return"><dt>Returns</dt><dd>long The grpc connectivity state </dd></dl>
  175. </div>
  176. </div>
  177. <a id="afce31d39c37f42d29cae7c5fbd5279d9"></a>
  178. <h2 class="memtitle"><span class="permalink"><a href="#afce31d39c37f42d29cae7c5fbd5279d9">&#9670;&nbsp;</a></span>getTarget()</h2>
  179. <div class="memitem">
  180. <div class="memproto">
  181. <table class="memname">
  182. <tr>
  183. <td class="memname">Grpc\Channel::getTarget </td>
  184. <td>(</td>
  185. <td class="paramname"></td><td>)</td>
  186. <td></td>
  187. </tr>
  188. </table>
  189. </div><div class="memdoc">
  190. <p>Get the endpoint this call/stream is connected to. </p>
  191. <dl class="section return"><dt>Returns</dt><dd>string The URI of the endpoint </dd></dl>
  192. </div>
  193. </div>
  194. <a id="a2ef0546000edb6aba1f8e0233a75b10d"></a>
  195. <h2 class="memtitle"><span class="permalink"><a href="#a2ef0546000edb6aba1f8e0233a75b10d">&#9670;&nbsp;</a></span>watchConnectivityState()</h2>
  196. <div class="memitem">
  197. <div class="memproto">
  198. <table class="memname">
  199. <tr>
  200. <td class="memname">Grpc\Channel::watchConnectivityState </td>
  201. <td>(</td>
  202. <td class="paramtype">&#160;</td>
  203. <td class="paramname"><em>$last_state</em>, </td>
  204. </tr>
  205. <tr>
  206. <td class="paramkey"></td>
  207. <td></td>
  208. <td class="paramtype">&#160;</td>
  209. <td class="paramname"><em>$deadline_obj</em>&#160;</td>
  210. </tr>
  211. <tr>
  212. <td></td>
  213. <td>)</td>
  214. <td></td><td></td>
  215. </tr>
  216. </table>
  217. </div><div class="memdoc">
  218. <p>Watch the connectivity state of the channel until it changed. </p>
  219. <dl class="params"><dt>Parameters</dt><dd>
  220. <table class="params">
  221. <tr><td class="paramtype">long</td><td class="paramname">$last_state</td><td>The previous connectivity state of the channel </td></tr>
  222. <tr><td class="paramtype"><a class="el" href="class_grpc_1_1_timeval.html" title="class Timeval">Timeval</a></td><td class="paramname">$deadline_obj</td><td>The deadline this function should wait until </td></tr>
  223. </table>
  224. </dd>
  225. </dl>
  226. <dl class="section return"><dt>Returns</dt><dd>bool If the connectivity state changes from last_state before deadline </dd></dl>
  227. </div>
  228. </div>
  229. <hr/>The documentation for this class was generated from the following file:<ul>
  230. <li>src/php/lib/Grpc/<a class="el" href="_channel_8php.html">Channel.php</a></li>
  231. </ul>
  232. </div><!-- contents -->
  233. <!-- start footer part -->
  234. <hr class="footer"/><address class="footer"><small>
  235. Generated on Wed Mar 3 2021 19:20:18 for GRPC PHP by &#160;<a href="http://www.doxygen.org/index.html">
  236. <img class="footer" src="doxygen.png" alt="doxygen"/>
  237. </a> 1.8.17
  238. </small></address>
  239. </body>
  240. </html>