module-src_client.makeClientConstructor-Client.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Client</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Client</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. <span class="ancestors"><a href="module-src_client.html">src/client</a><a href="module-src_client.html#.makeClientConstructor">.makeClientConstructor</a>~</span>
  21. Client
  22. </h2>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h4 class="name" id="Client"><span class="type-signature"></span>new Client<span class="signature">(address, credentials, options, updateMetadata<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  27. <div class="description">
  28. Create a client with the given methods
  29. </div>
  30. <h5>Parameters:</h5>
  31. <table class="params">
  32. <thead>
  33. <tr>
  34. <th>Name</th>
  35. <th>Type</th>
  36. <th>Attributes</th>
  37. <th class="last">Description</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <tr>
  42. <td class="name"><code>address</code></td>
  43. <td class="type">
  44. <span class="param-type">string</span>
  45. </td>
  46. <td class="attributes">
  47. </td>
  48. <td class="description last">The address of the server to connect to</td>
  49. </tr>
  50. <tr>
  51. <td class="name"><code>credentials</code></td>
  52. <td class="type">
  53. <span class="param-type">grpc.Credentials</span>
  54. </td>
  55. <td class="attributes">
  56. </td>
  57. <td class="description last">Credentials to use to connect
  58. to the server</td>
  59. </tr>
  60. <tr>
  61. <td class="name"><code>options</code></td>
  62. <td class="type">
  63. <span class="param-type">Object</span>
  64. </td>
  65. <td class="attributes">
  66. </td>
  67. <td class="description last">Options to pass to the underlying channel</td>
  68. </tr>
  69. <tr>
  70. <td class="name"><code>updateMetadata</code></td>
  71. <td class="type">
  72. <span class="param-type">function</span>
  73. </td>
  74. <td class="attributes">
  75. &lt;optional><br>
  76. </td>
  77. <td class="description last">function to
  78. update the metadata for each request</td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. <dl class="details">
  83. <dt class="tag-source">Source:</dt>
  84. <dd class="tag-source"><ul class="dummy"><li>
  85. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line548">line 548</a>
  86. </li></ul></dd>
  87. </dl>
  88. </div>
  89. <h3 class="subsection-title">Methods</h3>
  90. <h4 class="name" id="$waitForReady"><span class="type-signature"></span>$waitForReady<span class="signature">(deadline, callback)</span><span class="type-signature"></span></h4>
  91. <div class="description">
  92. Wait for the client to be ready. The callback will be called when the
  93. client has successfully connected to the server, and it will be called
  94. with an error if the attempt to connect to the server has unrecoverablly
  95. failed or if the deadline expires. This function will make the channel
  96. start connecting if it has not already done so.
  97. </div>
  98. <h5>Parameters:</h5>
  99. <table class="params">
  100. <thead>
  101. <tr>
  102. <th>Name</th>
  103. <th>Type</th>
  104. <th class="last">Description</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr>
  109. <td class="name"><code>deadline</code></td>
  110. <td class="type">
  111. <span class="param-type">Date</span>
  112. |
  113. <span class="param-type">Number</span>
  114. </td>
  115. <td class="description last">When to stop waiting for a connection. Pass
  116. Infinity to wait forever.</td>
  117. </tr>
  118. <tr>
  119. <td class="name"><code>callback</code></td>
  120. <td class="type">
  121. <span class="param-type">function</span>
  122. </td>
  123. <td class="description last">The callback to call when done attempting
  124. to connect.</td>
  125. </tr>
  126. </tbody>
  127. </table>
  128. <dl class="details">
  129. <dt class="tag-source">Source:</dt>
  130. <dd class="tag-source"><ul class="dummy"><li>
  131. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line577">line 577</a>
  132. </li></ul></dd>
  133. </dl>
  134. </article>
  135. </section>
  136. </div>
  137. <nav>
  138. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-src_client.html">src/client</a></li><li><a href="module-src_common.html">src/common</a></li><li><a href="module-src_server.html">src/server</a></li></ul><h3>Classes</h3><ul><li><a href="module-src_client.makeClientConstructor-Client.html">Client</a></li><li><a href="module-src_client-ClientDuplexStream.html">ClientDuplexStream</a></li><li><a href="module-src_client-ClientReadableStream.html">ClientReadableStream</a></li><li><a href="module-src_client-ClientWritableStream.html">ClientWritableStream</a></li><li><a href="module-src_server-Server.html">Server</a></li><li><a href="module-src_server-ServerDuplexStream.html">ServerDuplexStream</a></li><li><a href="module-src_server-ServerReadableStream.html">ServerReadableStream</a></li><li><a href="module-src_server-ServerWritableStream.html">ServerWritableStream</a></li></ul><h3>Global</h3><ul><li><a href="global.html#callError">callError</a></li><li><a href="global.html#Credentials">Credentials</a></li><li><a href="global.html#getGoogleAuthDelegate">getGoogleAuthDelegate</a></li><li><a href="global.html#load">load</a></li><li><a href="global.html#loadObject">loadObject</a></li><li><a href="global.html#makeGenericClientConstructor">makeGenericClientConstructor</a></li><li><a href="global.html#propagate">propagate</a></li><li><a href="global.html#Server">Server</a></li><li><a href="global.html#ServerCredentials">ServerCredentials</a></li><li><a href="global.html#status">status</a></li></ul>
  139. </nav>
  140. <br class="clear">
  141. <footer>
  142. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a> on Tue Aug 18 2015 18:25:05 GMT-0700 (PDT)
  143. </footer>
  144. <script> prettyPrint(); </script>
  145. <script src="scripts/linenumber.js"> </script>
  146. </body>
  147. </html>