Grpc.Core.ServerPort.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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.23.1.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">
  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"></div>
  58. <ul id="pagination"></ul>
  59. </div>
  60. </div>
  61. <div role="main" class="container body-content hide-when-search">
  62. <div class="sidenav hide-when-search">
  63. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  64. <div class="sidetoggle collapse" id="sidetoggle">
  65. <div id="sidetoc"></div>
  66. </div>
  67. </div>
  68. <div class="article row grid-right">
  69. <div class="col-md-10">
  70. <article class="content wrap" id="_content" data-uid="Grpc.Core.ServerPort">
  71. <h1 id="Grpc_Core_ServerPort" data-uid="Grpc.Core.ServerPort" class="text-break">Class ServerPort
  72. </h1>
  73. <div class="markdown level0 summary"><p>A port exposed by a server.</p>
  74. </div>
  75. <div class="markdown level0 conceptual"></div>
  76. <div class="inheritance">
  77. <h5>Inheritance</h5>
  78. <div class="level0"><span class="xref">System.Object</span></div>
  79. <div class="level1"><span class="xref">ServerPort</span></div>
  80. </div>
  81. <div class="inheritedMembers">
  82. <h5>Inherited Members</h5>
  83. <div>
  84. <span class="xref">System.Object.ToString()</span>
  85. </div>
  86. <div>
  87. <span class="xref">System.Object.Equals(System.Object)</span>
  88. </div>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetHashCode()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.GetType()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.MemberwiseClone()</span>
  103. </div>
  104. </div>
  105. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  106. <h6><strong>Assembly</strong>: Grpc.Core.dll</h6>
  107. <h5 id="Grpc_Core_ServerPort_syntax">Syntax</h5>
  108. <div class="codewrapper">
  109. <pre><code class="lang-csharp hljs">public class ServerPort</code></pre>
  110. </div>
  111. <h3 id="constructors">Constructors
  112. </h3>
  113. <a id="Grpc_Core_ServerPort__ctor_" data-uid="Grpc.Core.ServerPort.#ctor*"></a>
  114. <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>
  115. <div class="markdown level1 summary"><p>Creates a new port on which server should listen.</p>
  116. </div>
  117. <div class="markdown level1 conceptual"></div>
  118. <h5 class="decalaration">Declaration</h5>
  119. <div class="codewrapper">
  120. <pre><code class="lang-csharp hljs">public ServerPort(string host, int port, ServerCredentials credentials)</code></pre>
  121. </div>
  122. <h5 class="parameters">Parameters</h5>
  123. <table class="table table-bordered table-striped table-condensed">
  124. <thead>
  125. <tr>
  126. <th>Type</th>
  127. <th>Name</th>
  128. <th>Description</th>
  129. </tr>
  130. </thead>
  131. <tbody>
  132. <tr>
  133. <td><span class="xref">System.String</span></td>
  134. <td><span class="parametername">host</span></td>
  135. <td><p>the host</p>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td><span class="xref">System.Int32</span></td>
  140. <td><span class="parametername">port</span></td>
  141. <td><p>the port. If zero, an unused port is chosen automatically.</p>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td><a class="xref" href="Grpc.Core.ServerCredentials.html">ServerCredentials</a></td>
  146. <td><span class="parametername">credentials</span></td>
  147. <td><p>credentials to use to secure this port.</p>
  148. </td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <h3 id="fields">Fields
  153. </h3>
  154. <h4 id="Grpc_Core_ServerPort_PickUnused" data-uid="Grpc.Core.ServerPort.PickUnused">PickUnused</h4>
  155. <div class="markdown level1 summary"><p>Pass this value as port to have the server choose an unused listening port for you.
  156. 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>
  157. </div>
  158. <div class="markdown level1 conceptual"></div>
  159. <h5 class="decalaration">Declaration</h5>
  160. <div class="codewrapper">
  161. <pre><code class="lang-csharp hljs">public const int PickUnused = 0</code></pre>
  162. </div>
  163. <h5 class="fieldValue">Field Value</h5>
  164. <table class="table table-bordered table-striped table-condensed">
  165. <thead>
  166. <tr>
  167. <th>Type</th>
  168. <th>Description</th>
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <tr>
  173. <td><span class="xref">System.Int32</span></td>
  174. <td></td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. <h3 id="properties">Properties
  179. </h3>
  180. <a id="Grpc_Core_ServerPort_BoundPort_" data-uid="Grpc.Core.ServerPort.BoundPort*"></a>
  181. <h4 id="Grpc_Core_ServerPort_BoundPort" data-uid="Grpc.Core.ServerPort.BoundPort">BoundPort</h4>
  182. <div class="markdown level1 summary"></div>
  183. <div class="markdown level1 conceptual"></div>
  184. <h5 class="decalaration">Declaration</h5>
  185. <div class="codewrapper">
  186. <pre><code class="lang-csharp hljs">public int BoundPort { get; }</code></pre>
  187. </div>
  188. <h5 class="propertyValue">Property Value</h5>
  189. <table class="table table-bordered table-striped table-condensed">
  190. <thead>
  191. <tr>
  192. <th>Type</th>
  193. <th>Description</th>
  194. </tr>
  195. </thead>
  196. <tbody>
  197. <tr>
  198. <td><span class="xref">System.Int32</span></td>
  199. <td><p>The port actually bound by the server. This is useful if you let server
  200. pick port automatically. <a class="xref" href="Grpc.Core.ServerPort.html#Grpc_Core_ServerPort_PickUnused">PickUnused</a></p>
  201. </td>
  202. </tr>
  203. </tbody>
  204. </table>
  205. <a id="Grpc_Core_ServerPort_Credentials_" data-uid="Grpc.Core.ServerPort.Credentials*"></a>
  206. <h4 id="Grpc_Core_ServerPort_Credentials" data-uid="Grpc.Core.ServerPort.Credentials">Credentials</h4>
  207. <div class="markdown level1 summary"></div>
  208. <div class="markdown level1 conceptual"></div>
  209. <h5 class="decalaration">Declaration</h5>
  210. <div class="codewrapper">
  211. <pre><code class="lang-csharp hljs">public ServerCredentials Credentials { get; }</code></pre>
  212. </div>
  213. <h5 class="propertyValue">Property Value</h5>
  214. <table class="table table-bordered table-striped table-condensed">
  215. <thead>
  216. <tr>
  217. <th>Type</th>
  218. <th>Description</th>
  219. </tr>
  220. </thead>
  221. <tbody>
  222. <tr>
  223. <td><a class="xref" href="Grpc.Core.ServerCredentials.html">ServerCredentials</a></td>
  224. <td><p>The server credentials.</p>
  225. </td>
  226. </tr>
  227. </tbody>
  228. </table>
  229. <a id="Grpc_Core_ServerPort_Host_" data-uid="Grpc.Core.ServerPort.Host*"></a>
  230. <h4 id="Grpc_Core_ServerPort_Host" data-uid="Grpc.Core.ServerPort.Host">Host</h4>
  231. <div class="markdown level1 summary"></div>
  232. <div class="markdown level1 conceptual"></div>
  233. <h5 class="decalaration">Declaration</h5>
  234. <div class="codewrapper">
  235. <pre><code class="lang-csharp hljs">public string Host { get; }</code></pre>
  236. </div>
  237. <h5 class="propertyValue">Property Value</h5>
  238. <table class="table table-bordered table-striped table-condensed">
  239. <thead>
  240. <tr>
  241. <th>Type</th>
  242. <th>Description</th>
  243. </tr>
  244. </thead>
  245. <tbody>
  246. <tr>
  247. <td><span class="xref">System.String</span></td>
  248. <td><p>The host.</p>
  249. </td>
  250. </tr>
  251. </tbody>
  252. </table>
  253. <a id="Grpc_Core_ServerPort_Port_" data-uid="Grpc.Core.ServerPort.Port*"></a>
  254. <h4 id="Grpc_Core_ServerPort_Port" data-uid="Grpc.Core.ServerPort.Port">Port</h4>
  255. <div class="markdown level1 summary"></div>
  256. <div class="markdown level1 conceptual"></div>
  257. <h5 class="decalaration">Declaration</h5>
  258. <div class="codewrapper">
  259. <pre><code class="lang-csharp hljs">public int Port { get; }</code></pre>
  260. </div>
  261. <h5 class="propertyValue">Property Value</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><span class="xref">System.Int32</span></td>
  272. <td><p>The port.</p>
  273. </td>
  274. </tr>
  275. </tbody>
  276. </table>
  277. </article>
  278. </div>
  279. <div class="hidden-sm col-md-2" role="complementary">
  280. <div class="sideaffix">
  281. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  282. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  283. </nav>
  284. </div>
  285. </div>
  286. </div>
  287. </div>
  288. <footer>
  289. <div class="grad-bottom"></div>
  290. <div class="footer">
  291. <div class="container">
  292. <span class="pull-right">
  293. <a href="#top">Back to top</a>
  294. </span>
  295. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  296. </div>
  297. </div>
  298. </footer>
  299. </div>
  300. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  301. <script type="text/javascript" src="../styles/docfx.js"></script>
  302. <script type="text/javascript" src="../styles/main.js"></script>
  303. </body>
  304. </html>