grpc-ServerUnaryCall.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: ServerUnaryCall</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: ServerUnaryCall</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>
  20. <span class="ancestors"><a href="grpc.html">grpc</a>~</span>ServerUnaryCall<span class="signature">(call, metadata)</span><span class="type-signature"></span></h2>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h4 class="name" id="ServerUnaryCall"><span class="type-signature"></span>new ServerUnaryCall<span class="signature">(call, metadata)</span><span class="type-signature"></span></h4>
  25. <div class="description">
  26. <p>An EventEmitter. Used for unary calls.</p>
  27. </div>
  28. <h5>Parameters:</h5>
  29. <table class="params">
  30. <thead>
  31. <tr>
  32. <th>Name</th>
  33. <th>Type</th>
  34. <th class="last">Description</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr>
  39. <td class="name"><code>call</code></td>
  40. <td class="type">
  41. <span class="param-type">grpc.internal~Call</span>
  42. </td>
  43. <td class="description last"><p>The call object associated with the request</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>metadata</code></td>
  47. <td class="type">
  48. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  49. </td>
  50. <td class="description last"><p>The request metadata from the client</p></td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. <dl class="details">
  55. <dt class="tag-source">Source:</dt>
  56. <dd class="tag-source"><ul class="dummy"><li>
  57. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line225">line 225</a>
  58. </li></ul></dd>
  59. </dl>
  60. </div>
  61. <h3 class="subsection-title">Extends</h3>
  62. <ul>
  63. <li><a href="external-EventEmitter.html">external:EventEmitter</a></li>
  64. </ul>
  65. <h3 class="subsection-title">Members</h3>
  66. <h4 class="name" id="cancelled"><span class="type-signature"></span>cancelled<span class="type-signature"> :boolean</span></h4>
  67. <div class="description">
  68. <p>Indicates if the call has been cancelled</p>
  69. </div>
  70. <h5>Type:</h5>
  71. <ul>
  72. <li>
  73. <span class="param-type">boolean</span>
  74. </li>
  75. </ul>
  76. <dl class="details">
  77. <dt class="tag-source">Source:</dt>
  78. <dd class="tag-source"><ul class="dummy"><li>
  79. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line235">line 235</a>
  80. </li></ul></dd>
  81. </dl>
  82. <h4 class="name" id="metadata"><span class="type-signature"></span>metadata<span class="type-signature"> :<a href="grpc.Metadata.html">grpc.Metadata</a></span></h4>
  83. <div class="description">
  84. <p>The request metadata from the client</p>
  85. </div>
  86. <h5>Type:</h5>
  87. <ul>
  88. <li>
  89. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  90. </li>
  91. </ul>
  92. <dl class="details">
  93. <dt class="tag-source">Source:</dt>
  94. <dd class="tag-source"><ul class="dummy"><li>
  95. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line240">line 240</a>
  96. </li></ul></dd>
  97. </dl>
  98. <h4 class="name" id="request"><span class="type-signature"></span>request<span class="type-signature"> :*</span></h4>
  99. <div class="description">
  100. <p>The request message from the client</p>
  101. </div>
  102. <h5>Type:</h5>
  103. <ul>
  104. <li>
  105. <span class="param-type">*</span>
  106. </li>
  107. </ul>
  108. <dl class="details">
  109. <dt class="tag-source">Source:</dt>
  110. <dd class="tag-source"><ul class="dummy"><li>
  111. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line245">line 245</a>
  112. </li></ul></dd>
  113. </dl>
  114. <h3 class="subsection-title">Methods</h3>
  115. <h4 class="name" id="getPeer"><span class="type-signature"></span>getPeer<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  116. <div class="description">
  117. <p>Get the endpoint this call/stream is connected to.</p>
  118. </div>
  119. <dl class="details">
  120. <dt class="tag-source">Source:</dt>
  121. <dd class="tag-source"><ul class="dummy"><li>
  122. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line502">line 502</a>
  123. </li></ul></dd>
  124. </dl>
  125. <h5>Returns:</h5>
  126. <div class="param-desc">
  127. <p>The URI of the endpoint</p>
  128. </div>
  129. <dl>
  130. <dt>
  131. Type
  132. </dt>
  133. <dd>
  134. <span class="param-type">string</span>
  135. </dd>
  136. </dl>
  137. <h4 class="name" id="sendMetadata"><span class="type-signature"></span>sendMetadata<span class="signature">(responseMetadata)</span><span class="type-signature"></span></h4>
  138. <div class="description">
  139. <p>Send the initial metadata for a writable stream.</p>
  140. </div>
  141. <h5>Parameters:</h5>
  142. <table class="params">
  143. <thead>
  144. <tr>
  145. <th>Name</th>
  146. <th>Type</th>
  147. <th class="last">Description</th>
  148. </tr>
  149. </thead>
  150. <tbody>
  151. <tr>
  152. <td class="name"><code>responseMetadata</code></td>
  153. <td class="type">
  154. <span class="param-type">Metadata</span>
  155. </td>
  156. <td class="description last"><p>Metadata to send</p></td>
  157. </tr>
  158. </tbody>
  159. </table>
  160. <dl class="details">
  161. <dt class="tag-source">Source:</dt>
  162. <dd class="tag-source"><ul class="dummy"><li>
  163. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line475">line 475</a>
  164. </li></ul></dd>
  165. </dl>
  166. <h3 class="subsection-title">Events</h3>
  167. <h4 class="name" id="~event:cancelled">cancelled</h4>
  168. <div class="description">
  169. <p>Emitted when the call has been cancelled. After this has been emitted, the
  170. call's <code>cancelled</code> property will be set to <code>true</code>.</p>
  171. </div>
  172. <dl class="details">
  173. <dt class="tag-source">Source:</dt>
  174. <dd class="tag-source"><ul class="dummy"><li>
  175. <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line217">line 217</a>
  176. </li></ul></dd>
  177. </dl>
  178. </article>
  179. </section>
  180. </div>
  181. <nav>
  182. <h2><a href="index.html">Home</a></h2><h3>Externals</h3><ul><li><a href="external-Duplex.html">Duplex</a></li><li><a href="external-EventEmitter.html">EventEmitter</a></li><li><a href="external-GoogleCredential.html">GoogleCredential</a></li><li><a href="external-Readable.html">Readable</a></li><li><a href="external-Writable.html">Writable</a></li></ul><h3>Classes</h3><ul><li><a href="grpc.Client.html">Client</a></li><li><a href="grpc.credentials-CallCredentials.html">CallCredentials</a></li><li><a href="grpc.credentials-ChannelCredentials.html">ChannelCredentials</a></li><li><a href="grpc.Metadata.html">Metadata</a></li><li><a href="grpc.Server.html">Server</a></li><li><a href="grpc.ServerCredentials.html">ServerCredentials</a></li><li><a href="grpc-ClientDuplexStream.html">ClientDuplexStream</a></li><li><a href="grpc-ClientReadableStream.html">ClientReadableStream</a></li><li><a href="grpc-ClientUnaryCall.html">ClientUnaryCall</a></li><li><a href="grpc-ClientWritableStream.html">ClientWritableStream</a></li><li><a href="grpc-ServerDuplexStream.html">ServerDuplexStream</a></li><li><a href="grpc-ServerReadableStream.html">ServerReadableStream</a></li><li><a href="grpc-ServerUnaryCall.html">ServerUnaryCall</a></li><li><a href="grpc-ServerWritableStream.html">ServerWritableStream</a></li></ul><h3>Events</h3><ul><li><a href="grpc-ClientDuplexStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientDuplexStream.html#event:status">status</a></li><li><a href="grpc-ClientReadableStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientReadableStream.html#event:status">status</a></li><li><a href="grpc-ClientUnaryCall.html#event:metadata">metadata</a></li><li><a href="grpc-ClientUnaryCall.html#event:status">status</a></li><li><a href="grpc-ClientWritableStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientWritableStream.html#event:status">status</a></li><li><a href="grpc-ServerDuplexStream.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerReadableStream.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerUnaryCall.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerWritableStream.html#~event:cancelled">cancelled</a></li></ul><h3>Namespaces</h3><ul><li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">credentials</a></li></ul>
  183. </nav>
  184. <br class="clear">
  185. <footer>
  186. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.3</a> on Fri Sep 08 2017 11:10:31 GMT-0700 (PDT)
  187. </footer>
  188. <script> prettyPrint(); </script>
  189. <script src="scripts/linenumber.js"> </script>
  190. </body>
  191. </html>