grpc-ServerWritableStream.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983
  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: ServerWritableStream</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: ServerWritableStream</h1>
  69. <section>
  70. <header>
  71. <h2>
  72. <span class="ancestors"><a href="grpc.html">grpc</a>~</span>
  73. ServerWritableStream
  74. </h2>
  75. </header>
  76. <article>
  77. <div class="container-overview">
  78. <hr>
  79. <dt>
  80. <h4 class="name" id="ServerWritableStream"><span class="type-signature"></span>new ServerWritableStream(call, metadata, serialize)</h4>
  81. </dt>
  82. <dd>
  83. <div class="description">
  84. <p>A stream that the server can write to. Used for calls that are streaming from
  85. the server 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 send 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>serialize</code></td>
  113. <td class="type">
  114. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  115. </td>
  116. <td class="description last"><p>Serialization function for writes</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-Writable.html">external:Writable</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="metadata">
  149. <h4 id="metadata"><span class="type-signature"></span>metadata<span class="type-signature"> :<a href="grpc.Metadata.html">grpc.Metadata</a></span></h4>
  150. </dt>
  151. <dd>
  152. <div class="description">
  153. <p>The request metadata from the client</p>
  154. </div>
  155. <h5>Type:</h5>
  156. <ul>
  157. <li>
  158. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  159. </li>
  160. </ul>
  161. <dl class="details">
  162. </dl>
  163. </dd>
  164. <hr>
  165. <dt class="name" id="request">
  166. <h4 id="request"><span class="type-signature"></span>request<span class="type-signature"> :*</span></h4>
  167. </dt>
  168. <dd>
  169. <div class="description">
  170. <p>The request message from the client</p>
  171. </div>
  172. <h5>Type:</h5>
  173. <ul>
  174. <li>
  175. <span class="param-type">*</span>
  176. </li>
  177. </ul>
  178. <dl class="details">
  179. </dl>
  180. </dd>
  181. </dl>
  182. <h3 class="subsection-title">Methods</h3>
  183. <dl>
  184. <hr>
  185. <dt>
  186. <h4 class="name" id="getPeer"><span class="type-signature"></span>getPeer()</h4>
  187. </dt>
  188. <dd>
  189. <div class="description">
  190. <p>Get the endpoint this call/stream is connected to.</p>
  191. </div>
  192. <dl class="details">
  193. </dl>
  194. <h5>Returns:</h5>
  195. <div class="param-desc">
  196. <p>The URI of the endpoint</p>
  197. </div>
  198. <dl>
  199. <dt>
  200. Type
  201. </dt>
  202. <dd>
  203. <span class="param-type">string</span>
  204. </dd>
  205. </dl>
  206. </dd>
  207. <hr>
  208. <dt>
  209. <h4 class="name" id="sendMetadata"><span class="type-signature"></span>sendMetadata(responseMetadata)</h4>
  210. </dt>
  211. <dd>
  212. <div class="description">
  213. <p>Send the initial metadata for a writable stream.</p>
  214. </div>
  215. <h5>Parameters:</h5>
  216. <table class="params table table-striped">
  217. <thead>
  218. <tr>
  219. <th>Name</th>
  220. <th>Type</th>
  221. <th class="last">Description</th>
  222. </tr>
  223. </thead>
  224. <tbody>
  225. <tr>
  226. <td class="name"><code>responseMetadata</code></td>
  227. <td class="type">
  228. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  229. </td>
  230. <td class="description last"><p>Metadata to send</p></td>
  231. </tr>
  232. </tbody>
  233. </table>
  234. <dl class="details">
  235. </dl>
  236. </dd>
  237. </dl>
  238. <h3 class="subsection-title">Events</h3>
  239. <dl>
  240. <hr>
  241. <dt>
  242. <h4 class="name" id="~event:cancelled">cancelled</h4>
  243. </dt>
  244. <dd>
  245. <div class="description">
  246. <p>Emitted when the call has been cancelled. After this has been emitted, the
  247. call's <code>cancelled</code> property will be set to <code>true</code>.</p>
  248. </div>
  249. <dl class="details">
  250. </dl>
  251. </dd>
  252. </dl>
  253. </article>
  254. </section>
  255. </div>
  256. </div>
  257. <div class="clearfix"></div>
  258. <div class="col-md-3">
  259. <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
  260. </div>
  261. </div>
  262. </div>
  263. <div class="modal fade" id="searchResults">
  264. <div class="modal-dialog">
  265. <div class="modal-content">
  266. <div class="modal-header">
  267. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  268. <h4 class="modal-title">Search results</h4>
  269. </div>
  270. <div class="modal-body"></div>
  271. <div class="modal-footer">
  272. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  273. </div>
  274. </div><!-- /.modal-content -->
  275. </div><!-- /.modal-dialog -->
  276. </div>
  277. <footer>
  278. <span class="jsdoc-message">
  279. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
  280. on 2018-01-16T12:05:13-05:00
  281. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
  282. </span>
  283. </footer>
  284. <script src="scripts/docstrap.lib.js"></script>
  285. <script src="scripts/toc.js"></script>
  286. <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
  287. <script>
  288. $( function () {
  289. $( "[id*='$']" ).each( function () {
  290. var $this = $( this );
  291. $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
  292. } );
  293. $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
  294. var $this = $( this );
  295. var example = $this.find( "code" );
  296. exampleText = example.html();
  297. var lang = /{@lang (.*?)}/.exec( exampleText );
  298. if ( lang && lang[1] ) {
  299. exampleText = exampleText.replace( lang[0], "" );
  300. example.html( exampleText );
  301. lang = lang[1];
  302. } else {
  303. var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
  304. lang = langClassMatch ? langClassMatch[1] : "javascript";
  305. }
  306. if ( lang ) {
  307. $this
  308. .addClass( "sunlight-highlight-" + lang )
  309. .addClass( "linenums" )
  310. .html( example.html() );
  311. }
  312. } );
  313. Sunlight.highlightAll( {
  314. lineNumbers : false,
  315. showMenu : true,
  316. enableDoclinks : true
  317. } );
  318. $.catchAnchorLinks( {
  319. navbarOffset: 10
  320. } );
  321. $( "#toc" ).toc( {
  322. anchorName : function ( i, heading, prefix ) {
  323. return $( heading ).attr( "id" ) || ( prefix + i );
  324. },
  325. selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
  326. showAndHide : false,
  327. smoothScrolling: true
  328. } );
  329. $( "#main span[id^='toc']" ).addClass( "toc-shim" );
  330. $( '.dropdown-toggle' ).dropdown();
  331. $( "table" ).each( function () {
  332. var $this = $( this );
  333. $this.addClass('table');
  334. } );
  335. } );
  336. </script>
  337. <!--Navigation and Symbol Display-->
  338. <!--Google Analytics-->
  339. <script type="text/javascript">
  340. $(document).ready(function() {
  341. SearcherDisplay.init();
  342. });
  343. </script>
  344. </body>
  345. </html>