module-src_client.html 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Module: src/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">Module: src/client</h1>
  17. <section>
  18. <header>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <div class="description">Client module
  23. This module contains the factory method for creating Client classes, and the
  24. method calling code for all types of methods.
  25. For example, to create a client and call a method on it:
  26. var proto_obj = grpc.load(proto_file_path);
  27. var Client = proto_obj.package.subpackage.ServiceName;
  28. var client = new Client(server_address, client_credentials);
  29. var call = client.unaryMethod(arguments, callback);</div>
  30. <dl class="details">
  31. <dt class="tag-source">Source:</dt>
  32. <dd class="tag-source"><ul class="dummy"><li>
  33. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line34">line 34</a>
  34. </li></ul></dd>
  35. </dl>
  36. </div>
  37. <h3 class="subsection-title">Classes</h3>
  38. <dl>
  39. <dt><a href="module-src_client-ClientDuplexStream.html">ClientDuplexStream</a></dt>
  40. <dd></dd>
  41. <dt><a href="module-src_client-ClientReadableStream.html">ClientReadableStream</a></dt>
  42. <dd></dd>
  43. <dt><a href="module-src_client-ClientWritableStream.html">ClientWritableStream</a></dt>
  44. <dd></dd>
  45. </dl>
  46. <h3 class="subsection-title">Members</h3>
  47. <h4 class="name" id=".callError"><span class="type-signature">(static) </span>callError<span class="type-signature"></span></h4>
  48. <div class="description">
  49. See docs for client.callError
  50. </div>
  51. <dl class="details">
  52. <dt class="tag-source">Source:</dt>
  53. <dd class="tag-source"><ul class="dummy"><li>
  54. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line722">line 722</a>
  55. </li></ul></dd>
  56. </dl>
  57. <h4 class="name" id=".status"><span class="type-signature">(static) </span>status<span class="type-signature"></span></h4>
  58. <div class="description">
  59. Map of status code names to status codes
  60. </div>
  61. <dl class="details">
  62. <dt class="tag-source">Source:</dt>
  63. <dd class="tag-source"><ul class="dummy"><li>
  64. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line717">line 717</a>
  65. </li></ul></dd>
  66. </dl>
  67. <h4 class="name" id="~requester_makers"><span class="type-signature">(inner) </span>requester_makers<span class="type-signature"></span></h4>
  68. <div class="description">
  69. Map with short names for each of the requester maker functions. Used in
  70. makeClientConstructor
  71. </div>
  72. <dl class="details">
  73. <dt class="tag-source">Source:</dt>
  74. <dd class="tag-source"><ul class="dummy"><li>
  75. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line582">line 582</a>
  76. </li></ul></dd>
  77. </dl>
  78. <h3 class="subsection-title">Methods</h3>
  79. <h4 class="name" id=".getClientChannel"><span class="type-signature">(static) </span>getClientChannel<span class="signature">(client)</span><span class="type-signature"> &rarr; {Channel}</span></h4>
  80. <div class="description">
  81. Return the underlying channel object for the specified client
  82. </div>
  83. <h5>Parameters:</h5>
  84. <table class="params">
  85. <thead>
  86. <tr>
  87. <th>Name</th>
  88. <th>Type</th>
  89. <th class="last">Description</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. <tr>
  94. <td class="name"><code>client</code></td>
  95. <td class="type">
  96. <span class="param-type">Client</span>
  97. </td>
  98. <td class="description last"></td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <dl class="details">
  103. <dt class="tag-source">Source:</dt>
  104. <dd class="tag-source"><ul class="dummy"><li>
  105. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line663">line 663</a>
  106. </li></ul></dd>
  107. </dl>
  108. <h5>Returns:</h5>
  109. <div class="param-desc">
  110. The channel
  111. </div>
  112. <dl>
  113. <dt>
  114. Type
  115. </dt>
  116. <dd>
  117. <span class="param-type">Channel</span>
  118. </dd>
  119. </dl>
  120. <h4 class="name" id=".makeClientConstructor"><span class="type-signature">(static) </span>makeClientConstructor<span class="signature">(methods, serviceName)</span><span class="type-signature"> &rarr; {function}</span></h4>
  121. <div class="description">
  122. Creates a constructor for a client with the given methods. The methods object
  123. maps method name to an object with the following keys:
  124. path: The path on the server for accessing the method. For example, for
  125. protocol buffers, we use "/service_name/method_name"
  126. requestStream: bool indicating whether the client sends a stream
  127. resonseStream: bool indicating whether the server sends a stream
  128. requestSerialize: function to serialize request objects
  129. responseDeserialize: function to deserialize response objects
  130. </div>
  131. <h5>Parameters:</h5>
  132. <table class="params">
  133. <thead>
  134. <tr>
  135. <th>Name</th>
  136. <th>Type</th>
  137. <th class="last">Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <td class="name"><code>methods</code></td>
  143. <td class="type">
  144. <span class="param-type">Object</span>
  145. </td>
  146. <td class="description last">An object mapping method names to method attributes</td>
  147. </tr>
  148. <tr>
  149. <td class="name"><code>serviceName</code></td>
  150. <td class="type">
  151. <span class="param-type">string</span>
  152. </td>
  153. <td class="description last">The fully qualified name of the service</td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <dl class="details">
  158. <dt class="tag-source">Source:</dt>
  159. <dd class="tag-source"><ul class="dummy"><li>
  160. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line602">line 602</a>
  161. </li></ul></dd>
  162. </dl>
  163. <h5>Returns:</h5>
  164. <div class="param-desc">
  165. New client constructor
  166. </div>
  167. <dl>
  168. <dt>
  169. Type
  170. </dt>
  171. <dd>
  172. <span class="param-type">function</span>
  173. </dd>
  174. </dl>
  175. <h4 class="name" id=".makeProtobufClientConstructor"><span class="type-signature">(static) </span>makeProtobufClientConstructor<span class="signature">(service, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
  176. <div class="description">
  177. Creates a constructor for clients for the given service
  178. </div>
  179. <h5>Parameters:</h5>
  180. <table class="params">
  181. <thead>
  182. <tr>
  183. <th>Name</th>
  184. <th>Type</th>
  185. <th>Attributes</th>
  186. <th class="last">Description</th>
  187. </tr>
  188. </thead>
  189. <tbody>
  190. <tr>
  191. <td class="name"><code>service</code></td>
  192. <td class="type">
  193. <span class="param-type">ProtoBuf.Reflect.Service</span>
  194. </td>
  195. <td class="attributes">
  196. </td>
  197. <td class="description last">The service to generate a client
  198. for</td>
  199. </tr>
  200. <tr>
  201. <td class="name"><code>options</code></td>
  202. <td class="type">
  203. <span class="param-type">Object</span>
  204. </td>
  205. <td class="attributes">
  206. &lt;optional><br>
  207. </td>
  208. <td class="description last">Options to apply to the client</td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. <dl class="details">
  213. <dt class="tag-source">Source:</dt>
  214. <dd class="tag-source"><ul class="dummy"><li>
  215. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line704">line 704</a>
  216. </li></ul></dd>
  217. </dl>
  218. <h5>Returns:</h5>
  219. <div class="param-desc">
  220. New client constructor
  221. </div>
  222. <dl>
  223. <dt>
  224. Type
  225. </dt>
  226. <dd>
  227. <span class="param-type">function</span>
  228. </dd>
  229. </dl>
  230. <h4 class="name" id=".waitForClientReady"><span class="type-signature">(static) </span>waitForClientReady<span class="signature">(client, deadline, callback)</span><span class="type-signature"></span></h4>
  231. <div class="description">
  232. Wait for the client to be ready. The callback will be called when the
  233. client has successfully connected to the server, and it will be called
  234. with an error if the attempt to connect to the server has unrecoverablly
  235. failed or if the deadline expires. This function will make the channel
  236. start connecting if it has not already done so.
  237. </div>
  238. <h5>Parameters:</h5>
  239. <table class="params">
  240. <thead>
  241. <tr>
  242. <th>Name</th>
  243. <th>Type</th>
  244. <th class="last">Description</th>
  245. </tr>
  246. </thead>
  247. <tbody>
  248. <tr>
  249. <td class="name"><code>client</code></td>
  250. <td class="type">
  251. <span class="param-type">Client</span>
  252. </td>
  253. <td class="description last">The client to wait on</td>
  254. </tr>
  255. <tr>
  256. <td class="name"><code>deadline</code></td>
  257. <td class="type">
  258. <span class="param-type">Date</span>
  259. |
  260. <span class="param-type">Number</span>
  261. </td>
  262. <td class="description last">When to stop waiting for a connection. Pass
  263. Infinity to wait forever.</td>
  264. </tr>
  265. <tr>
  266. <td class="name"><code>callback</code></td>
  267. <td class="type">
  268. <span class="param-type">function</span>
  269. </td>
  270. <td class="description last">The callback to call when done attempting
  271. to connect.</td>
  272. </tr>
  273. </tbody>
  274. </table>
  275. <dl class="details">
  276. <dt class="tag-source">Source:</dt>
  277. <dd class="tag-source"><ul class="dummy"><li>
  278. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line679">line 679</a>
  279. </li></ul></dd>
  280. </dl>
  281. <h4 class="name" id="~cancel"><span class="type-signature">(inner) </span>cancel<span class="signature">()</span><span class="type-signature"></span></h4>
  282. <div class="description">
  283. Cancel the ongoing call
  284. </div>
  285. <dl class="details">
  286. <dt class="tag-source">Source:</dt>
  287. <dd class="tag-source"><ul class="dummy"><li>
  288. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line214">line 214</a>
  289. </li></ul></dd>
  290. </dl>
  291. <h4 class="name" id="~getCall"><span class="type-signature">(inner) </span>getCall<span class="signature">(options)</span><span class="type-signature"></span></h4>
  292. <div class="description">
  293. Get a call object built with the provided options. Keys for options are
  294. 'deadline', which takes a date or number, and 'host', which takes a string
  295. and overrides the hostname to connect to.
  296. </div>
  297. <h5>Parameters:</h5>
  298. <table class="params">
  299. <thead>
  300. <tr>
  301. <th>Name</th>
  302. <th>Type</th>
  303. <th class="last">Description</th>
  304. </tr>
  305. </thead>
  306. <tbody>
  307. <tr>
  308. <td class="name"><code>options</code></td>
  309. <td class="type">
  310. <span class="param-type">Object</span>
  311. </td>
  312. <td class="description last">Options map.</td>
  313. </tr>
  314. </tbody>
  315. </table>
  316. <dl class="details">
  317. <dt class="tag-source">Source:</dt>
  318. <dd class="tag-source"><ul class="dummy"><li>
  319. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line242">line 242</a>
  320. </li></ul></dd>
  321. </dl>
  322. <h4 class="name" id="~getPeer"><span class="type-signature">(inner) </span>getPeer<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  323. <div class="description">
  324. Get the endpoint this call/stream is connected to.
  325. </div>
  326. <dl class="details">
  327. <dt class="tag-source">Source:</dt>
  328. <dd class="tag-source"><ul class="dummy"><li>
  329. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line227">line 227</a>
  330. </li></ul></dd>
  331. </dl>
  332. <h5>Returns:</h5>
  333. <div class="param-desc">
  334. The URI of the endpoint
  335. </div>
  336. <dl>
  337. <dt>
  338. Type
  339. </dt>
  340. <dd>
  341. <span class="param-type">string</span>
  342. </dd>
  343. </dl>
  344. <h4 class="name" id="~makeBidiStreamRequestFunction"><span class="type-signature">(inner) </span>makeBidiStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  345. <div class="description">
  346. Get a function that can make bidirectional stream requests to the specified
  347. method.
  348. </div>
  349. <h5>Parameters:</h5>
  350. <table class="params">
  351. <thead>
  352. <tr>
  353. <th>Name</th>
  354. <th>Type</th>
  355. <th class="last">Description</th>
  356. </tr>
  357. </thead>
  358. <tbody>
  359. <tr>
  360. <td class="name"><code>method</code></td>
  361. <td class="type">
  362. <span class="param-type">string</span>
  363. </td>
  364. <td class="description last">The name of the method to request</td>
  365. </tr>
  366. <tr>
  367. <td class="name"><code>serialize</code></td>
  368. <td class="type">
  369. <span class="param-type">function</span>
  370. </td>
  371. <td class="description last">The serialization function for inputs</td>
  372. </tr>
  373. <tr>
  374. <td class="name"><code>deserialize</code></td>
  375. <td class="type">
  376. <span class="param-type">function</span>
  377. </td>
  378. <td class="description last">The deserialization function for
  379. outputs</td>
  380. </tr>
  381. </tbody>
  382. </table>
  383. <dl class="details">
  384. <dt class="tag-source">Source:</dt>
  385. <dd class="tag-source"><ul class="dummy"><li>
  386. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line521">line 521</a>
  387. </li></ul></dd>
  388. </dl>
  389. <h5>Returns:</h5>
  390. <div class="param-desc">
  391. makeBidiStreamRequest
  392. </div>
  393. <dl>
  394. <dt>
  395. Type
  396. </dt>
  397. <dd>
  398. <span class="param-type">function</span>
  399. </dd>
  400. </dl>
  401. <h4 class="name" id="~makeClientStreamRequestFunction"><span class="type-signature">(inner) </span>makeClientStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  402. <div class="description">
  403. Get a function that can make client stream requests to the specified method.
  404. </div>
  405. <h5>Parameters:</h5>
  406. <table class="params">
  407. <thead>
  408. <tr>
  409. <th>Name</th>
  410. <th>Type</th>
  411. <th class="last">Description</th>
  412. </tr>
  413. </thead>
  414. <tbody>
  415. <tr>
  416. <td class="name"><code>method</code></td>
  417. <td class="type">
  418. <span class="param-type">string</span>
  419. </td>
  420. <td class="description last">The name of the method to request</td>
  421. </tr>
  422. <tr>
  423. <td class="name"><code>serialize</code></td>
  424. <td class="type">
  425. <span class="param-type">function</span>
  426. </td>
  427. <td class="description last">The serialization function for inputs</td>
  428. </tr>
  429. <tr>
  430. <td class="name"><code>deserialize</code></td>
  431. <td class="type">
  432. <span class="param-type">function</span>
  433. </td>
  434. <td class="description last">The deserialization function for
  435. outputs</td>
  436. </tr>
  437. </tbody>
  438. </table>
  439. <dl class="details">
  440. <dt class="tag-source">Source:</dt>
  441. <dd class="tag-source"><ul class="dummy"><li>
  442. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line363">line 363</a>
  443. </li></ul></dd>
  444. </dl>
  445. <h5>Returns:</h5>
  446. <div class="param-desc">
  447. makeClientStreamRequest
  448. </div>
  449. <dl>
  450. <dt>
  451. Type
  452. </dt>
  453. <dd>
  454. <span class="param-type">function</span>
  455. </dd>
  456. </dl>
  457. <h4 class="name" id="~makeServerStreamRequestFunction"><span class="type-signature">(inner) </span>makeServerStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  458. <div class="description">
  459. Get a function that can make server stream requests to the specified method.
  460. </div>
  461. <h5>Parameters:</h5>
  462. <table class="params">
  463. <thead>
  464. <tr>
  465. <th>Name</th>
  466. <th>Type</th>
  467. <th class="last">Description</th>
  468. </tr>
  469. </thead>
  470. <tbody>
  471. <tr>
  472. <td class="name"><code>method</code></td>
  473. <td class="type">
  474. <span class="param-type">string</span>
  475. </td>
  476. <td class="description last">The name of the method to request</td>
  477. </tr>
  478. <tr>
  479. <td class="name"><code>serialize</code></td>
  480. <td class="type">
  481. <span class="param-type">function</span>
  482. </td>
  483. <td class="description last">The serialization function for inputs</td>
  484. </tr>
  485. <tr>
  486. <td class="name"><code>deserialize</code></td>
  487. <td class="type">
  488. <span class="param-type">function</span>
  489. </td>
  490. <td class="description last">The deserialization function for
  491. outputs</td>
  492. </tr>
  493. </tbody>
  494. </table>
  495. <dl class="details">
  496. <dt class="tag-source">Source:</dt>
  497. <dd class="tag-source"><ul class="dummy"><li>
  498. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line447">line 447</a>
  499. </li></ul></dd>
  500. </dl>
  501. <h5>Returns:</h5>
  502. <div class="param-desc">
  503. makeServerStreamRequest
  504. </div>
  505. <dl>
  506. <dt>
  507. Type
  508. </dt>
  509. <dd>
  510. <span class="param-type">function</span>
  511. </dd>
  512. </dl>
  513. <h4 class="name" id="~makeUnaryRequestFunction"><span class="type-signature">(inner) </span>makeUnaryRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  514. <div class="description">
  515. Get a function that can make unary requests to the specified method.
  516. </div>
  517. <h5>Parameters:</h5>
  518. <table class="params">
  519. <thead>
  520. <tr>
  521. <th>Name</th>
  522. <th>Type</th>
  523. <th class="last">Description</th>
  524. </tr>
  525. </thead>
  526. <tbody>
  527. <tr>
  528. <td class="name"><code>method</code></td>
  529. <td class="type">
  530. <span class="param-type">string</span>
  531. </td>
  532. <td class="description last">The name of the method to request</td>
  533. </tr>
  534. <tr>
  535. <td class="name"><code>serialize</code></td>
  536. <td class="type">
  537. <span class="param-type">function</span>
  538. </td>
  539. <td class="description last">The serialization function for inputs</td>
  540. </tr>
  541. <tr>
  542. <td class="name"><code>deserialize</code></td>
  543. <td class="type">
  544. <span class="param-type">function</span>
  545. </td>
  546. <td class="description last">The deserialization function for
  547. outputs</td>
  548. </tr>
  549. </tbody>
  550. </table>
  551. <dl class="details">
  552. <dt class="tag-source">Source:</dt>
  553. <dd class="tag-source"><ul class="dummy"><li>
  554. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line274">line 274</a>
  555. </li></ul></dd>
  556. </dl>
  557. <h5>Returns:</h5>
  558. <div class="param-desc">
  559. makeUnaryRequest
  560. </div>
  561. <dl>
  562. <dt>
  563. Type
  564. </dt>
  565. <dd>
  566. <span class="param-type">function</span>
  567. </dd>
  568. </dl>
  569. </article>
  570. </section>
  571. </div>
  572. <nav>
  573. <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_credentials.html">src/credentials</a></li><li><a href="module-src_metadata.html">src/metadata</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_metadata-Metadata.html">Metadata</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#getClientChannel">getClientChannel</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#Metadata">Metadata</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><li><a href="global.html#waitForClientReady">waitForClientReady</a></li><li><a href="global.html#writeFlags">writeFlags</a></li></ul>
  574. </nav>
  575. <br class="clear">
  576. <footer>
  577. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
  578. </footer>
  579. <script> prettyPrint(); </script>
  580. <script src="scripts/linenumber.js"> </script>
  581. </body>
  582. </html>