protocol_g_r_p_c_response_handler-p.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC Objective-C: &lt;GRPCResponseHandler&gt; Protocol Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC Objective-C
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. </div><!-- top -->
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#pub-methods">Instance Methods</a> </div>
  65. <div class="headertitle">
  66. <div class="title">&lt;GRPCResponseHandler&gt; Protocol Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p>An object can implement this protocol to receive responses from server from a call.
  70. <a href="protocol_g_r_p_c_response_handler-p.html#details">More...</a></p>
  71. <p><code>#import &lt;<a class="el" href="_g_r_p_c_call_8h_source.html">GRPCCall.h</a>&gt;</code></p>
  72. <table class="memberdecls">
  73. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  74. Instance Methods</h2></td></tr>
  75. <tr class="memitem:adc82f4ed3ffc8f7c0e91beed9538dbd6"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_g_r_p_c_response_handler-p.html#adc82f4ed3ffc8f7c0e91beed9538dbd6">didReceiveInitialMetadata:</a></td></tr>
  76. <tr class="memdesc:adc82f4ed3ffc8f7c0e91beed9538dbd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issued when initial metadata is received from the server. <a href="protocol_g_r_p_c_response_handler-p.html#adc82f4ed3ffc8f7c0e91beed9538dbd6">More...</a><br /></td></tr>
  77. <tr class="separator:adc82f4ed3ffc8f7c0e91beed9538dbd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a1cc519d6bf578da70a507197c99dc312"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_g_r_p_c_response_handler-p.html#a1cc519d6bf578da70a507197c99dc312">didReceiveRawMessage:</a></td></tr>
  79. <tr class="memdesc:a1cc519d6bf578da70a507197c99dc312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issued when a message is received from the server. <a href="protocol_g_r_p_c_response_handler-p.html#a1cc519d6bf578da70a507197c99dc312">More...</a><br /></td></tr>
  80. <tr class="separator:a1cc519d6bf578da70a507197c99dc312"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a384dd702a37a2fa7db82b8330cfcddcf"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_g_r_p_c_response_handler-p.html#a384dd702a37a2fa7db82b8330cfcddcf">didReceiveData:</a></td></tr>
  82. <tr class="memdesc:a384dd702a37a2fa7db82b8330cfcddcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issued when gRPC message is received from the server. <a href="protocol_g_r_p_c_response_handler-p.html#a384dd702a37a2fa7db82b8330cfcddcf">More...</a><br /></td></tr>
  83. <tr class="separator:a384dd702a37a2fa7db82b8330cfcddcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:af69153885066acb9c4431d93dc320049"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_g_r_p_c_response_handler-p.html#af69153885066acb9c4431d93dc320049">didCloseWithTrailingMetadata:error:</a></td></tr>
  85. <tr class="memdesc:af69153885066acb9c4431d93dc320049"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issued when a call finished. <a href="protocol_g_r_p_c_response_handler-p.html#af69153885066acb9c4431d93dc320049">More...</a><br /></td></tr>
  86. <tr class="separator:af69153885066acb9c4431d93dc320049"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:a5c5aa4f2f8623e00344ca5e6a3180300"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_g_r_p_c_response_handler-p.html#a5c5aa4f2f8623e00344ca5e6a3180300">didWriteData</a></td></tr>
  88. <tr class="memdesc:a5c5aa4f2f8623e00344ca5e6a3180300"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issued when flow control is enabled for the call and a message written with GRPCCall2::writeData is passed to gRPC core with SEND_MESSAGE operation. <a href="protocol_g_r_p_c_response_handler-p.html#a5c5aa4f2f8623e00344ca5e6a3180300">More...</a><br /></td></tr>
  89. <tr class="separator:a5c5aa4f2f8623e00344ca5e6a3180300"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. </table><table class="memberdecls">
  91. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
  92. Additional Inherited Members</h2></td></tr>
  93. <tr class="inherit_header properties_protocol_g_r_p_c_dispatchable-p"><td colspan="2" onclick="javascript:toggleInherit('properties_protocol_g_r_p_c_dispatchable-p')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="protocol_g_r_p_c_dispatchable-p.html">&lt;GRPCDispatchable&gt;</a></td></tr>
  94. <tr class="memitem:ab896f3635c26fb9185a79c0aa26e89c0 inherit properties_protocol_g_r_p_c_dispatchable-p"><td class="memItemLeft" align="right" valign="top">dispatch_queue_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_g_r_p_c_dispatchable-p.html#ab896f3635c26fb9185a79c0aa26e89c0">dispatchQueue</a></td></tr>
  95. <tr class="memdesc:ab896f3635c26fb9185a79c0aa26e89c0 inherit properties_protocol_g_r_p_c_dispatchable-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">The dispatch queue where the object's methods should be run on. <a href="protocol_g_r_p_c_dispatchable-p.html#ab896f3635c26fb9185a79c0aa26e89c0">More...</a><br /></td></tr>
  96. <tr class="separator:ab896f3635c26fb9185a79c0aa26e89c0 inherit properties_protocol_g_r_p_c_dispatchable-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. </table>
  98. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  99. <div class="textblock"><p>An object can implement this protocol to receive responses from server from a call. </p>
  100. </div><h2 class="groupheader">Method Documentation</h2>
  101. <a id="af69153885066acb9c4431d93dc320049"></a>
  102. <h2 class="memtitle"><span class="permalink"><a href="#af69153885066acb9c4431d93dc320049">&#9670;&nbsp;</a></span>didCloseWithTrailingMetadata:error:</h2>
  103. <div class="memitem">
  104. <div class="memproto">
  105. <table class="mlabels">
  106. <tr>
  107. <td class="mlabels-left">
  108. <table class="memname">
  109. <tr>
  110. <td class="memname">- (void) didCloseWithTrailingMetadata: </td>
  111. <td></td>
  112. <td class="paramtype">(nullable NSDictionary *)&#160;</td>
  113. <td class="paramname"><em>trailingMetadata</em></td>
  114. </tr>
  115. <tr>
  116. <td class="paramkey">error:</td>
  117. <td></td>
  118. <td class="paramtype">(nullable NSError *)&#160;</td>
  119. <td class="paramname"><em>error</em>&#160;</td>
  120. </tr>
  121. <tr>
  122. <td></td>
  123. <td></td>
  124. <td></td><td></td>
  125. </tr>
  126. </table>
  127. </td>
  128. <td class="mlabels-right">
  129. <span class="mlabels"><span class="mlabel">optional</span></span> </td>
  130. </tr>
  131. </table>
  132. </div><div class="memdoc">
  133. <p>Issued when a call finished. </p>
  134. <p>If the call finished successfully, <code>error</code> is nil and <code>trailingMetadata</code> consists any trailing metadata received from the server. Otherwise, <code>error</code> is non-nil and contains the corresponding error information, including gRPC error codes and error descriptions. </p>
  135. <p>Reimplemented in <a class="el" href="interface_g_r_p_c_interceptor.html#a3788cf6d26ec1df66e975bd571280090">GRPCInterceptor</a>.</p>
  136. </div>
  137. </div>
  138. <a id="a384dd702a37a2fa7db82b8330cfcddcf"></a>
  139. <h2 class="memtitle"><span class="permalink"><a href="#a384dd702a37a2fa7db82b8330cfcddcf">&#9670;&nbsp;</a></span>didReceiveData:</h2>
  140. <div class="memitem">
  141. <div class="memproto">
  142. <table class="mlabels">
  143. <tr>
  144. <td class="mlabels-left">
  145. <table class="memname">
  146. <tr>
  147. <td class="memname">- (void) didReceiveData: </td>
  148. <td></td>
  149. <td class="paramtype">(id)&#160;</td>
  150. <td class="paramname"><em>data</em></td>
  151. <td></td>
  152. </tr>
  153. </table>
  154. </td>
  155. <td class="mlabels-right">
  156. <span class="mlabels"><span class="mlabel">optional</span></span> </td>
  157. </tr>
  158. </table>
  159. </div><div class="memdoc">
  160. <p>Issued when gRPC message is received from the server. </p>
  161. <p>The data is always decompressed with gRPC or HTTP compression algorithm specified in the response header. <code>data</code> could be any type as transport layer and interceptors may modify the type of the data (e.g. a Protobuf interceptor may consume NSData typed data and issue GPBMessage typed data to user). Users should interpret <code>data</code> according to the configuration of their calls. Interceptor authors should not assume the type of <code>data</code> unless an agreement is made on how it should be used in a particular call setting. </p>
  162. <p>Reimplemented in <a class="el" href="interface_g_r_p_c_interceptor.html#ae1a71998631c23254d3667b6de40b487">GRPCInterceptor</a>.</p>
  163. </div>
  164. </div>
  165. <a id="adc82f4ed3ffc8f7c0e91beed9538dbd6"></a>
  166. <h2 class="memtitle"><span class="permalink"><a href="#adc82f4ed3ffc8f7c0e91beed9538dbd6">&#9670;&nbsp;</a></span>didReceiveInitialMetadata:</h2>
  167. <div class="memitem">
  168. <div class="memproto">
  169. <table class="mlabels">
  170. <tr>
  171. <td class="mlabels-left">
  172. <table class="memname">
  173. <tr>
  174. <td class="memname">- (void) didReceiveInitialMetadata: </td>
  175. <td></td>
  176. <td class="paramtype">(nullable NSDictionary *)&#160;</td>
  177. <td class="paramname"><em>initialMetadata</em></td>
  178. <td></td>
  179. </tr>
  180. </table>
  181. </td>
  182. <td class="mlabels-right">
  183. <span class="mlabels"><span class="mlabel">optional</span></span> </td>
  184. </tr>
  185. </table>
  186. </div><div class="memdoc">
  187. <p>Issued when initial metadata is received from the server. </p>
  188. <p>Reimplemented in <a class="el" href="interface_g_r_p_c_interceptor.html#a0a50fe0dc7ce33c82814c4949b8f282a">GRPCInterceptor</a>.</p>
  189. </div>
  190. </div>
  191. <a id="a1cc519d6bf578da70a507197c99dc312"></a>
  192. <h2 class="memtitle"><span class="permalink"><a href="#a1cc519d6bf578da70a507197c99dc312">&#9670;&nbsp;</a></span>didReceiveRawMessage:</h2>
  193. <div class="memitem">
  194. <div class="memproto">
  195. <table class="mlabels">
  196. <tr>
  197. <td class="mlabels-left">
  198. <table class="memname">
  199. <tr>
  200. <td class="memname">- (void) didReceiveRawMessage: </td>
  201. <td></td>
  202. <td class="paramtype">(nullable NSData *)&#160;</td>
  203. <td class="paramname"><em>message</em></td>
  204. <td></td>
  205. </tr>
  206. </table>
  207. </td>
  208. <td class="mlabels-right">
  209. <span class="mlabels"><span class="mlabel">optional</span></span> </td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Issued when a message is received from the server. </p>
  214. <p>The message is the raw data received from the server, with decompression and without proto deserialization.</p>
  215. <p><b> This method is deprecated and does not work with interceptors.</b> To use <a class="el" href="interface_g_r_p_c_call2.html" title="A GRPCCall2 object represents an RPC call.">GRPCCall2</a> interface with interceptor, please implement GRPCResponseHandler::didReceiveData method and leave this method unimplemented. If this method and didReceiveRawMessage are implemented at the same time, implementation of this method will be ignored. </p>
  216. </div>
  217. </div>
  218. <a id="a5c5aa4f2f8623e00344ca5e6a3180300"></a>
  219. <h2 class="memtitle"><span class="permalink"><a href="#a5c5aa4f2f8623e00344ca5e6a3180300">&#9670;&nbsp;</a></span>didWriteData</h2>
  220. <div class="memitem">
  221. <div class="memproto">
  222. <table class="mlabels">
  223. <tr>
  224. <td class="mlabels-left">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">- (void) didWriteData </td>
  228. <td></td>
  229. <td class="paramname"></td>
  230. <td></td>
  231. </tr>
  232. </table>
  233. </td>
  234. <td class="mlabels-right">
  235. <span class="mlabels"><span class="mlabel">optional</span></span> </td>
  236. </tr>
  237. </table>
  238. </div><div class="memdoc">
  239. <p>Issued when flow control is enabled for the call and a message written with GRPCCall2::writeData is passed to gRPC core with SEND_MESSAGE operation. </p>
  240. <p>Reimplemented in <a class="el" href="interface_g_r_p_c_interceptor.html#a4a9d9fbfe49dbe6305ced6cc516da038">GRPCInterceptor</a>.</p>
  241. </div>
  242. </div>
  243. <hr/>The documentation for this protocol was generated from the following file:<ul>
  244. <li>src/objective-c/GRPCClient/<a class="el" href="_g_r_p_c_call_8h_source.html">GRPCCall.h</a></li>
  245. </ul>
  246. </div><!-- contents -->
  247. <!-- start footer part -->
  248. <hr class="footer"/><address class="footer"><small>
  249. Generated on Wed Mar 3 2021 19:20:10 for GRPC Objective-C by &#160;<a href="http://www.doxygen.org/index.html">
  250. <img class="footer" src="doxygen.png" alt="doxygen"/>
  251. </a> 1.8.17
  252. </small></address>
  253. </body>
  254. </html>