grpc-ServerReadableStream.html 16 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Documentation Class: ServerReadableStream</title>
  7. <!--[if lt IE 9]>
  8. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  9. <![endif]-->
  10. <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
  11. <link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
  12. <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-60127042-1', 'auto'); ga('send', 'pageview'); </script></head>
  13. <body>
  14. <div class="navbar navbar-default navbar-fixed-top ">
  15. <div class="container">
  16. <div class="navbar-header">
  17. <a class="navbar-brand" href="index.html">Documentation</a>
  18. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. <span class="icon-bar"></span>
  22. </button>
  23. </div>
  24. <div class="navbar-collapse collapse" id="topNavigation">
  25. <ul class="nav navbar-nav">
  26. <li class="dropdown">
  27. <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  28. <ul class="dropdown-menu ">
  29. <li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">grpc.credentials</a></li>
  30. </ul>
  31. </li>
  32. <li class="dropdown">
  33. <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  34. <ul class="dropdown-menu ">
  35. <li><a href="grpc.Client.html">grpc.Client</a></li><li><a href="grpc.credentials-CallCredentials.html">grpc.credentials~CallCredentials</a></li><li><a href="grpc.credentials-ChannelCredentials.html">grpc.credentials~ChannelCredentials</a></li><li><a href="grpc.Metadata.html">grpc.Metadata</a></li><li><a href="grpc.Server.html">grpc.Server</a></li><li><a href="grpc.ServerCredentials.html">grpc.ServerCredentials</a></li><li><a href="grpc-ClientDuplexStream.html">grpc~ClientDuplexStream</a></li><li><a href="grpc-ClientReadableStream.html">grpc~ClientReadableStream</a></li><li><a href="grpc-ClientUnaryCall.html">grpc~ClientUnaryCall</a></li><li><a href="grpc-ClientWritableStream.html">grpc~ClientWritableStream</a></li><li><a href="grpc-ServerDuplexStream.html">grpc~ServerDuplexStream</a></li><li><a href="grpc-ServerReadableStream.html">grpc~ServerReadableStream</a></li><li><a href="grpc-ServerUnaryCall.html">grpc~ServerUnaryCall</a></li><li><a href="grpc-ServerWritableStream.html">grpc~ServerWritableStream</a></li>
  36. </ul>
  37. </li>
  38. <li class="dropdown">
  39. <a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
  40. <ul class="dropdown-menu ">
  41. <li><a href="grpc-ClientDuplexStream.html#event:metadata">grpc~ClientDuplexStream#metadata</a></li><li><a href="grpc-ClientDuplexStream.html#event:status">grpc~ClientDuplexStream#status</a></li><li><a href="grpc-ClientReadableStream.html#event:metadata">grpc~ClientReadableStream#metadata</a></li><li><a href="grpc-ClientReadableStream.html#event:status">grpc~ClientReadableStream#status</a></li><li><a href="grpc-ClientUnaryCall.html#event:metadata">grpc~ClientUnaryCall#event:metadata</a></li><li><a href="grpc-ClientUnaryCall.html#event:status">grpc~ClientUnaryCall#event:status</a></li><li><a href="grpc-ClientWritableStream.html#event:metadata">grpc~ClientWritableStream#metadata</a></li><li><a href="grpc-ClientWritableStream.html#event:status">grpc~ClientWritableStream#status</a></li><li><a href="grpc-ServerDuplexStream.html#~event:cancelled">grpc~ServerDuplexStream~event:cancelled</a></li><li><a href="grpc-ServerReadableStream.html#~event:cancelled">grpc~ServerReadableStream~event:cancelled</a></li><li><a href="grpc-ServerUnaryCall.html#~event:cancelled">grpc~ServerUnaryCall~event:cancelled</a></li><li><a href="grpc-ServerWritableStream.html#~event:cancelled">grpc~ServerWritableStream~event:cancelled</a></li>
  42. </ul>
  43. </li>
  44. <li class="dropdown">
  45. <a href="externals.list.html" class="dropdown-toggle" data-toggle="dropdown">Externals<b class="caret"></b></a>
  46. <ul class="dropdown-menu ">
  47. <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>
  48. </ul>
  49. </li>
  50. </ul>
  51. <div class="col-sm-3 col-md-3">
  52. <form class="navbar-form" role="search">
  53. <div class="input-group">
  54. <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
  55. <div class="input-group-btn">
  56. <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
  57. </div>
  58. </div>
  59. </form>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="container" id="toc-content">
  65. <div class="row">
  66. <div class="col-md-8">
  67. <div id="main">
  68. <h1 class="page-title">Class: ServerReadableStream</h1>
  69. <section>
  70. <header>
  71. <h2>
  72. <span class="ancestors"><a href="grpc.html">grpc</a>~</span>
  73. ServerReadableStream
  74. </h2>
  75. </header>
  76. <article>
  77. <div class="container-overview">
  78. <hr>
  79. <dt>
  80. <h4 class="name" id="ServerReadableStream"><span class="type-signature"></span>new ServerReadableStream(call, metadata, deserialize)</h4>
  81. </dt>
  82. <dd>
  83. <div class="description">
  84. <p>A stream that the server can read from. Used for calls that are streaming
  85. from the client side.</p>
  86. </div>
  87. <h5>Parameters:</h5>
  88. <table class="params table table-striped">
  89. <thead>
  90. <tr>
  91. <th>Name</th>
  92. <th>Type</th>
  93. <th class="last">Description</th>
  94. </tr>
  95. </thead>
  96. <tbody>
  97. <tr>
  98. <td class="name"><code>call</code></td>
  99. <td class="type">
  100. <span class="param-type">grpc.internal~Call</span>
  101. </td>
  102. <td class="description last"><p>The call object to read data with</p></td>
  103. </tr>
  104. <tr>
  105. <td class="name"><code>metadata</code></td>
  106. <td class="type">
  107. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  108. </td>
  109. <td class="description last"><p>The request metadata from the client</p></td>
  110. </tr>
  111. <tr>
  112. <td class="name"><code>deserialize</code></td>
  113. <td class="type">
  114. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  115. </td>
  116. <td class="description last"><p>Deserialization function for reads</p></td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. <dl class="details">
  121. </dl>
  122. </dd>
  123. </div>
  124. <h3 class="subsection-title">Extends</h3>
  125. <ul>
  126. <li><a href="external-Readable.html">external:Readable</a></li>
  127. </ul>
  128. <h3 class="subsection-title">Members</h3>
  129. <dl>
  130. <hr>
  131. <dt class="name" id="cancelled">
  132. <h4 id="cancelled"><span class="type-signature"></span>cancelled<span class="type-signature"> :boolean</span></h4>
  133. </dt>
  134. <dd>
  135. <div class="description">
  136. <p>Indicates if the call has been cancelled</p>
  137. </div>
  138. <h5>Type:</h5>
  139. <ul>
  140. <li>
  141. <span class="param-type">boolean</span>
  142. </li>
  143. </ul>
  144. <dl class="details">
  145. </dl>
  146. </dd>
  147. <hr>
  148. <dt class="name" id="cancelled">
  149. <h4 id="cancelled"><span class="type-signature"></span>cancelled<span class="type-signature"> :boolean</span></h4>
  150. </dt>
  151. <dd>
  152. <div class="description">
  153. <p>Indicates if the call has been cancelled</p>
  154. </div>
  155. <h5>Type:</h5>
  156. <ul>
  157. <li>
  158. <span class="param-type">boolean</span>
  159. </li>
  160. </ul>
  161. <dl class="details">
  162. </dl>
  163. </dd>
  164. <hr>
  165. <dt class="name" id="metadata">
  166. <h4 id="metadata"><span class="type-signature"></span>metadata<span class="type-signature"> :<a href="grpc.Metadata.html">grpc.Metadata</a></span></h4>
  167. </dt>
  168. <dd>
  169. <div class="description">
  170. <p>The request metadata from the client</p>
  171. </div>
  172. <h5>Type:</h5>
  173. <ul>
  174. <li>
  175. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  176. </li>
  177. </ul>
  178. <dl class="details">
  179. </dl>
  180. </dd>
  181. <hr>
  182. <dt class="name" id="metadata">
  183. <h4 id="metadata"><span class="type-signature"></span>metadata<span class="type-signature"> :<a href="grpc.Metadata.html">grpc.Metadata</a></span></h4>
  184. </dt>
  185. <dd>
  186. <div class="description">
  187. <p>The request metadata from the client</p>
  188. </div>
  189. <h5>Type:</h5>
  190. <ul>
  191. <li>
  192. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  193. </li>
  194. </ul>
  195. <dl class="details">
  196. </dl>
  197. </dd>
  198. </dl>
  199. <h3 class="subsection-title">Methods</h3>
  200. <dl>
  201. <hr>
  202. <dt>
  203. <h4 class="name" id="getPeer"><span class="type-signature"></span>getPeer()</h4>
  204. </dt>
  205. <dd>
  206. <div class="description">
  207. <p>Get the endpoint this call/stream is connected to.</p>
  208. </div>
  209. <dl class="details">
  210. </dl>
  211. <h5>Returns:</h5>
  212. <div class="param-desc">
  213. <p>The URI of the endpoint</p>
  214. </div>
  215. <dl>
  216. <dt>
  217. Type
  218. </dt>
  219. <dd>
  220. <span class="param-type">string</span>
  221. </dd>
  222. </dl>
  223. </dd>
  224. <hr>
  225. <dt>
  226. <h4 class="name" id="sendMetadata"><span class="type-signature"></span>sendMetadata(responseMetadata)</h4>
  227. </dt>
  228. <dd>
  229. <div class="description">
  230. <p>Send the initial metadata for a writable stream.</p>
  231. </div>
  232. <h5>Parameters:</h5>
  233. <table class="params table table-striped">
  234. <thead>
  235. <tr>
  236. <th>Name</th>
  237. <th>Type</th>
  238. <th class="last">Description</th>
  239. </tr>
  240. </thead>
  241. <tbody>
  242. <tr>
  243. <td class="name"><code>responseMetadata</code></td>
  244. <td class="type">
  245. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  246. </td>
  247. <td class="description last"><p>Metadata to send</p></td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. <dl class="details">
  252. </dl>
  253. </dd>
  254. </dl>
  255. <h3 class="subsection-title">Events</h3>
  256. <dl>
  257. <hr>
  258. <dt>
  259. <h4 class="name" id="~event:cancelled">cancelled</h4>
  260. </dt>
  261. <dd>
  262. <div class="description">
  263. <p>Emitted when the call has been cancelled. After this has been emitted, the
  264. call's <code>cancelled</code> property will be set to <code>true</code>.</p>
  265. </div>
  266. <dl class="details">
  267. </dl>
  268. </dd>
  269. </dl>
  270. </article>
  271. </section>
  272. </div>
  273. </div>
  274. <div class="clearfix"></div>
  275. <div class="col-md-3">
  276. <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="modal fade" id="searchResults">
  281. <div class="modal-dialog">
  282. <div class="modal-content">
  283. <div class="modal-header">
  284. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  285. <h4 class="modal-title">Search results</h4>
  286. </div>
  287. <div class="modal-body"></div>
  288. <div class="modal-footer">
  289. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  290. </div>
  291. </div><!-- /.modal-content -->
  292. </div><!-- /.modal-dialog -->
  293. </div>
  294. <footer>
  295. <span class="jsdoc-message">
  296. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
  297. on 2018-01-16T12:05:13-05:00
  298. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
  299. </span>
  300. </footer>
  301. <script src="scripts/docstrap.lib.js"></script>
  302. <script src="scripts/toc.js"></script>
  303. <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
  304. <script>
  305. $( function () {
  306. $( "[id*='$']" ).each( function () {
  307. var $this = $( this );
  308. $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
  309. } );
  310. $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
  311. var $this = $( this );
  312. var example = $this.find( "code" );
  313. exampleText = example.html();
  314. var lang = /{@lang (.*?)}/.exec( exampleText );
  315. if ( lang && lang[1] ) {
  316. exampleText = exampleText.replace( lang[0], "" );
  317. example.html( exampleText );
  318. lang = lang[1];
  319. } else {
  320. var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
  321. lang = langClassMatch ? langClassMatch[1] : "javascript";
  322. }
  323. if ( lang ) {
  324. $this
  325. .addClass( "sunlight-highlight-" + lang )
  326. .addClass( "linenums" )
  327. .html( example.html() );
  328. }
  329. } );
  330. Sunlight.highlightAll( {
  331. lineNumbers : false,
  332. showMenu : true,
  333. enableDoclinks : true
  334. } );
  335. $.catchAnchorLinks( {
  336. navbarOffset: 10
  337. } );
  338. $( "#toc" ).toc( {
  339. anchorName : function ( i, heading, prefix ) {
  340. return $( heading ).attr( "id" ) || ( prefix + i );
  341. },
  342. selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
  343. showAndHide : false,
  344. smoothScrolling: true
  345. } );
  346. $( "#main span[id^='toc']" ).addClass( "toc-shim" );
  347. $( '.dropdown-toggle' ).dropdown();
  348. $( "table" ).each( function () {
  349. var $this = $( this );
  350. $this.addClass('table');
  351. } );
  352. } );
  353. </script>
  354. <!--Navigation and Symbol Display-->
  355. <!--Google Analytics-->
  356. <script type="text/javascript">
  357. $(document).ready(function() {
  358. SearcherDisplay.init();
  359. });
  360. </script>
  361. </body>
  362. </html>