Grpc.Core.ServerPort.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class ServerPort
  8. | gRPC C# </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ServerPort
  11. | gRPC C# ">
  12. <meta name="generator" content="docfx 2.36.0.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <meta property="docfx:navrel" content="../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../index.html">
  34. <img id="logo" class="svg" src="../logo.svg" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Grpc.Core.ServerPort">
  73. <h1 id="Grpc_Core_ServerPort" data-uid="Grpc.Core.ServerPort" class="text-break">Class ServerPort
  74. </h1>
  75. <div class="markdown level0 summary"><p>A port exposed by a server.</p>
  76. </div>
  77. <div class="markdown level0 conceptual"></div>
  78. <div class="inheritance">
  79. <h5>Inheritance</h5>
  80. <div class="level0"><span class="xref">System.Object</span></div>
  81. <div class="level1"><span class="xref">ServerPort</span></div>
  82. </div>
  83. <div class="inheritedMembers">
  84. <h5>Inherited Members</h5>
  85. <div>
  86. <span class="xref">System.Object.Equals(System.Object)</span>
  87. </div>
  88. <div>
  89. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  90. </div>
  91. <div>
  92. <span class="xref">System.Object.GetHashCode()</span>
  93. </div>
  94. <div>
  95. <span class="xref">System.Object.GetType()</span>
  96. </div>
  97. <div>
  98. <span class="xref">System.Object.MemberwiseClone()</span>
  99. </div>
  100. <div>
  101. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  102. </div>
  103. <div>
  104. <span class="xref">System.Object.ToString()</span>
  105. </div>
  106. </div>
  107. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  108. <h6><strong>Assembly</strong>: Grpc.Core.dll</h6>
  109. <h5 id="Grpc_Core_ServerPort_syntax">Syntax</h5>
  110. <div class="codewrapper">
  111. <pre><code class="lang-csharp hljs">public class ServerPort</code></pre>
  112. </div>
  113. <h3 id="constructors">Constructors
  114. </h3>
  115. <a id="Grpc_Core_ServerPort__ctor_" data-uid="Grpc.Core.ServerPort.#ctor*"></a>
  116. <h4 id="Grpc_Core_ServerPort__ctor_System_String_System_Int32_Grpc_Core_ServerCredentials_" data-uid="Grpc.Core.ServerPort.#ctor(System.String,System.Int32,Grpc.Core.ServerCredentials)">ServerPort(String, Int32, ServerCredentials)</h4>
  117. <div class="markdown level1 summary"><p>Creates a new port on which server should listen.</p>
  118. </div>
  119. <div class="markdown level1 conceptual"></div>
  120. <h5 class="decalaration">Declaration</h5>
  121. <div class="codewrapper">
  122. <pre><code class="lang-csharp hljs">public ServerPort(string host, int port, ServerCredentials credentials)</code></pre>
  123. </div>
  124. <h5 class="parameters">Parameters</h5>
  125. <table class="table table-bordered table-striped table-condensed">
  126. <thead>
  127. <tr>
  128. <th>Type</th>
  129. <th>Name</th>
  130. <th>Description</th>
  131. </tr>
  132. </thead>
  133. <tbody>
  134. <tr>
  135. <td><span class="xref">System.String</span></td>
  136. <td><span class="parametername">host</span></td>
  137. <td><p>the host</p>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td><span class="xref">System.Int32</span></td>
  142. <td><span class="parametername">port</span></td>
  143. <td><p>the port. If zero, an unused port is chosen automatically.</p>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td><a class="xref" href="Grpc.Core.ServerCredentials.html">ServerCredentials</a></td>
  148. <td><span class="parametername">credentials</span></td>
  149. <td><p>credentials to use to secure this port.</p>
  150. </td>
  151. </tr>
  152. </tbody>
  153. </table>
  154. <h3 id="fields">Fields
  155. </h3>
  156. <h4 id="Grpc_Core_ServerPort_PickUnused" data-uid="Grpc.Core.ServerPort.PickUnused">PickUnused</h4>
  157. <div class="markdown level1 summary"><p>Pass this value as port to have the server choose an unused listening port for you.
  158. Ports added to a server will contain the bound port in their <a class="xref" href="Grpc.Core.ServerPort.html#Grpc_Core_ServerPort_BoundPort">BoundPort</a> property.</p>
  159. </div>
  160. <div class="markdown level1 conceptual"></div>
  161. <h5 class="decalaration">Declaration</h5>
  162. <div class="codewrapper">
  163. <pre><code class="lang-csharp hljs">public const int PickUnused = 0</code></pre>
  164. </div>
  165. <h5 class="fieldValue">Field Value</h5>
  166. <table class="table table-bordered table-striped table-condensed">
  167. <thead>
  168. <tr>
  169. <th>Type</th>
  170. <th>Description</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. <tr>
  175. <td><span class="xref">System.Int32</span></td>
  176. <td></td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. <h3 id="properties">Properties
  181. </h3>
  182. <a id="Grpc_Core_ServerPort_BoundPort_" data-uid="Grpc.Core.ServerPort.BoundPort*"></a>
  183. <h4 id="Grpc_Core_ServerPort_BoundPort" data-uid="Grpc.Core.ServerPort.BoundPort">BoundPort</h4>
  184. <div class="markdown level1 summary"></div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public int BoundPort { get; }</code></pre>
  189. </div>
  190. <h5 class="propertyValue">Property Value</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Description</th>
  196. </tr>
  197. </thead>
  198. <tbody>
  199. <tr>
  200. <td><span class="xref">System.Int32</span></td>
  201. <td><p>The port actually bound by the server. This is useful if you let server
  202. pick port automatically. <a class="xref" href="Grpc.Core.ServerPort.html#Grpc_Core_ServerPort_PickUnused">PickUnused</a></p>
  203. </td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <a id="Grpc_Core_ServerPort_Credentials_" data-uid="Grpc.Core.ServerPort.Credentials*"></a>
  208. <h4 id="Grpc_Core_ServerPort_Credentials" data-uid="Grpc.Core.ServerPort.Credentials">Credentials</h4>
  209. <div class="markdown level1 summary"></div>
  210. <div class="markdown level1 conceptual"></div>
  211. <h5 class="decalaration">Declaration</h5>
  212. <div class="codewrapper">
  213. <pre><code class="lang-csharp hljs">public ServerCredentials Credentials { get; }</code></pre>
  214. </div>
  215. <h5 class="propertyValue">Property Value</h5>
  216. <table class="table table-bordered table-striped table-condensed">
  217. <thead>
  218. <tr>
  219. <th>Type</th>
  220. <th>Description</th>
  221. </tr>
  222. </thead>
  223. <tbody>
  224. <tr>
  225. <td><a class="xref" href="Grpc.Core.ServerCredentials.html">ServerCredentials</a></td>
  226. <td><p>The server credentials.</p>
  227. </td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <a id="Grpc_Core_ServerPort_Host_" data-uid="Grpc.Core.ServerPort.Host*"></a>
  232. <h4 id="Grpc_Core_ServerPort_Host" data-uid="Grpc.Core.ServerPort.Host">Host</h4>
  233. <div class="markdown level1 summary"></div>
  234. <div class="markdown level1 conceptual"></div>
  235. <h5 class="decalaration">Declaration</h5>
  236. <div class="codewrapper">
  237. <pre><code class="lang-csharp hljs">public string Host { get; }</code></pre>
  238. </div>
  239. <h5 class="propertyValue">Property Value</h5>
  240. <table class="table table-bordered table-striped table-condensed">
  241. <thead>
  242. <tr>
  243. <th>Type</th>
  244. <th>Description</th>
  245. </tr>
  246. </thead>
  247. <tbody>
  248. <tr>
  249. <td><span class="xref">System.String</span></td>
  250. <td><p>The host.</p>
  251. </td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. <a id="Grpc_Core_ServerPort_Port_" data-uid="Grpc.Core.ServerPort.Port*"></a>
  256. <h4 id="Grpc_Core_ServerPort_Port" data-uid="Grpc.Core.ServerPort.Port">Port</h4>
  257. <div class="markdown level1 summary"></div>
  258. <div class="markdown level1 conceptual"></div>
  259. <h5 class="decalaration">Declaration</h5>
  260. <div class="codewrapper">
  261. <pre><code class="lang-csharp hljs">public int Port { get; }</code></pre>
  262. </div>
  263. <h5 class="propertyValue">Property Value</h5>
  264. <table class="table table-bordered table-striped table-condensed">
  265. <thead>
  266. <tr>
  267. <th>Type</th>
  268. <th>Description</th>
  269. </tr>
  270. </thead>
  271. <tbody>
  272. <tr>
  273. <td><span class="xref">System.Int32</span></td>
  274. <td><p>The port.</p>
  275. </td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. </article>
  280. </div>
  281. <div class="hidden-sm col-md-2" role="complementary">
  282. <div class="sideaffix">
  283. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  284. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  285. </nav>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <footer>
  291. <div class="grad-bottom"></div>
  292. <div class="footer">
  293. <div class="container">
  294. <span class="pull-right">
  295. <a href="#top">Back to top</a>
  296. </span>
  297. <span>Generated by <strong>DocFX</strong></span>
  298. </div>
  299. </div>
  300. </footer>
  301. </div>
  302. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  303. <script type="text/javascript" src="../styles/docfx.js"></script>
  304. <script type="text/javascript" src="../styles/main.js"></script>
  305. </body>
  306. </html>