MQTTProtocolOut_8c.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  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>MQTT C Client Libraries Internals: MQTTProtocolOut.c File 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="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">MQTT C Client Libraries Internals
  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="#func-members">Functions</a> &#124;
  65. <a href="#var-members">Variables</a> </div>
  66. <div class="headertitle">
  67. <div class="title">MQTTProtocolOut.c File Reference</div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>Functions dealing with the MQTT protocol exchanges.
  71. <a href="#details">More...</a></p>
  72. <div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
  73. <code>#include &lt;string.h&gt;</code><br />
  74. <code>#include &lt;ctype.h&gt;</code><br />
  75. <code>#include &quot;MQTTProtocolOut.h&quot;</code><br />
  76. <code>#include &quot;StackTrace.h&quot;</code><br />
  77. <code>#include &quot;Heap.h&quot;</code><br />
  78. <code>#include &quot;WebSocket.h&quot;</code><br />
  79. <code>#include &quot;Proxy.h&quot;</code><br />
  80. <code>#include &quot;Base64.h&quot;</code><br />
  81. </div><div class="textblock"><div class="dynheader">
  82. Include dependency graph for MQTTProtocolOut.c:</div>
  83. <div class="dyncontent">
  84. <div class="center"><img src="MQTTProtocolOut_8c__incl.png" border="0" usemap="#MQTTProtocolOut_8c" alt=""/></div>
  85. <map name="MQTTProtocolOut_8c" id="MQTTProtocolOut_8c">
  86. <area shape="rect" title="Functions dealing with the MQTT protocol exchanges." alt="" coords="55,5,194,32"/>
  87. <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
  88. <area shape="rect" title=" " alt="" coords="93,80,157,107"/>
  89. <area shape="rect" title=" " alt="" coords="181,80,244,107"/>
  90. </map>
  91. </div>
  92. </div><table class="memberdecls">
  93. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  94. Functions</h2></td></tr>
  95. <tr class="memitem:ae9a2970a33893540e42ff5a8d95411dc"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#ae9a2970a33893540e42ff5a8d95411dc">MQTTProtocol_addressPort</a> (const char *uri, int *port, const char **topic, int default_port)</td></tr>
  96. <tr class="memdesc:ae9a2970a33893540e42ff5a8d95411dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Separates an address:port into two separate values. <a href="MQTTProtocolOut_8c.html#ae9a2970a33893540e42ff5a8d95411dc">More...</a><br /></td></tr>
  97. <tr class="separator:ae9a2970a33893540e42ff5a8d95411dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a6b8949d7db9299fa5fd940e8e58f31b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a6b8949d7db9299fa5fd940e8e58f31b6">MQTTProtocol_specialChars</a> (char *p0, char *p1, b64_size_t *basic_auth_in_len)</td></tr>
  99. <tr class="memdesc:a6b8949d7db9299fa5fd940e8e58f31b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow user or password characters to be expressed in the form of XX, XX being the hexadecimal value of the character. <a href="MQTTProtocolOut_8c.html#a6b8949d7db9299fa5fd940e8e58f31b6">More...</a><br /></td></tr>
  100. <tr class="separator:a6b8949d7db9299fa5fd940e8e58f31b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:a9c80eda45033b7db33b09a02218cb8c9"><td class="memItemLeft" align="right" valign="top"><a id="a9c80eda45033b7db33b09a02218cb8c9"></a>
  102. int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTProtocol_setHTTPProxy</b> (<a class="el" href="structClients.html">Clients</a> *aClient, char *source, char **dest, char **auth_dest, char *prefix)</td></tr>
  103. <tr class="separator:a9c80eda45033b7db33b09a02218cb8c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:ad9baf307647cbe6516eadbbe975cda8c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#ad9baf307647cbe6516eadbbe975cda8c">MQTTProtocol_connect</a> (const char *ip_address, <a class="el" href="structClients.html">Clients</a> *aClient, int websocket, int MQTTVersion, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
  105. <tr class="memdesc:ad9baf307647cbe6516eadbbe975cda8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT outgoing connect processing for a client. <a href="MQTTProtocolOut_8c.html#ad9baf307647cbe6516eadbbe975cda8c">More...</a><br /></td></tr>
  106. <tr class="separator:ad9baf307647cbe6516eadbbe975cda8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:ad298c92c74b5f1acda774fc95e3d61c3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#ad298c92c74b5f1acda774fc95e3d61c3">MQTTProtocol_handlePingresps</a> (void *pack, SOCKET sock)</td></tr>
  108. <tr class="memdesc:ad298c92c74b5f1acda774fc95e3d61c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pingresp packet for a socket. <a href="MQTTProtocolOut_8c.html#ad298c92c74b5f1acda774fc95e3d61c3">More...</a><br /></td></tr>
  109. <tr class="separator:ad298c92c74b5f1acda774fc95e3d61c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a460d021d06dd24cf975dfe20e17ab1ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a460d021d06dd24cf975dfe20e17ab1ba">MQTTProtocol_subscribe</a> (<a class="el" href="structClients.html">Clients</a> *client, <a class="el" href="structList.html">List</a> *topics, <a class="el" href="structList.html">List</a> *qoss, int msgID, <a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *opts, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  111. <tr class="memdesc:a460d021d06dd24cf975dfe20e17ab1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT outgoing subscribe processing for a client. <a href="MQTTProtocolOut_8c.html#a460d021d06dd24cf975dfe20e17ab1ba">More...</a><br /></td></tr>
  112. <tr class="separator:a460d021d06dd24cf975dfe20e17ab1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a5424115bf427436c2d40058f15261ed0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a5424115bf427436c2d40058f15261ed0">MQTTProtocol_handleSubacks</a> (void *pack, SOCKET sock)</td></tr>
  114. <tr class="memdesc:a5424115bf427436c2d40058f15261ed0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming suback packet for a socket. <a href="MQTTProtocolOut_8c.html#a5424115bf427436c2d40058f15261ed0">More...</a><br /></td></tr>
  115. <tr class="separator:a5424115bf427436c2d40058f15261ed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a69083f5a059d129d1030140ec1cd3d58"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a69083f5a059d129d1030140ec1cd3d58">MQTTProtocol_unsubscribe</a> (<a class="el" href="structClients.html">Clients</a> *client, <a class="el" href="structList.html">List</a> *topics, int msgID, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  117. <tr class="memdesc:a69083f5a059d129d1030140ec1cd3d58"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT outgoing unsubscribe processing for a client. <a href="MQTTProtocolOut_8c.html#a69083f5a059d129d1030140ec1cd3d58">More...</a><br /></td></tr>
  118. <tr class="separator:a69083f5a059d129d1030140ec1cd3d58"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a0b9648549a1a132eecadb74df2e84f57"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a0b9648549a1a132eecadb74df2e84f57">MQTTProtocol_handleUnsubacks</a> (void *pack, SOCKET sock)</td></tr>
  120. <tr class="memdesc:a0b9648549a1a132eecadb74df2e84f57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming unsuback packet for a socket. <a href="MQTTProtocolOut_8c.html#a0b9648549a1a132eecadb74df2e84f57">More...</a><br /></td></tr>
  121. <tr class="separator:a0b9648549a1a132eecadb74df2e84f57"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a4f914518a8e2d68cc9d9fbb2c22cdf6f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolOut_8c.html#a4f914518a8e2d68cc9d9fbb2c22cdf6f">MQTTProtocol_handleDisconnects</a> (void *pack, SOCKET sock)</td></tr>
  123. <tr class="memdesc:a4f914518a8e2d68cc9d9fbb2c22cdf6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming disconnect packet for a socket. <a href="MQTTProtocolOut_8c.html#a4f914518a8e2d68cc9d9fbb2c22cdf6f">More...</a><br /></td></tr>
  124. <tr class="separator:a4f914518a8e2d68cc9d9fbb2c22cdf6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. </table><table class="memberdecls">
  126. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  127. Variables</h2></td></tr>
  128. <tr class="memitem:a2f44b42678b96ba591f6042671e3ba6b"><td class="memItemLeft" align="right" valign="top"><a id="a2f44b42678b96ba591f6042671e3ba6b"></a>
  129. <a class="el" href="structClientStates.html">ClientStates</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>bstate</b></td></tr>
  130. <tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. </table>
  132. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  133. <div class="textblock"><p>Functions dealing with the MQTT protocol exchanges. </p>
  134. <p>Some other related functions are in the MQTTProtocolClient module </p>
  135. </div><h2 class="groupheader">Function Documentation</h2>
  136. <a id="ae9a2970a33893540e42ff5a8d95411dc"></a>
  137. <h2 class="memtitle"><span class="permalink"><a href="#ae9a2970a33893540e42ff5a8d95411dc">&#9670;&nbsp;</a></span>MQTTProtocol_addressPort()</h2>
  138. <div class="memitem">
  139. <div class="memproto">
  140. <table class="memname">
  141. <tr>
  142. <td class="memname">size_t MQTTProtocol_addressPort </td>
  143. <td>(</td>
  144. <td class="paramtype">const char *&#160;</td>
  145. <td class="paramname"><em>uri</em>, </td>
  146. </tr>
  147. <tr>
  148. <td class="paramkey"></td>
  149. <td></td>
  150. <td class="paramtype">int *&#160;</td>
  151. <td class="paramname"><em>port</em>, </td>
  152. </tr>
  153. <tr>
  154. <td class="paramkey"></td>
  155. <td></td>
  156. <td class="paramtype">const char **&#160;</td>
  157. <td class="paramname"><em>topic</em>, </td>
  158. </tr>
  159. <tr>
  160. <td class="paramkey"></td>
  161. <td></td>
  162. <td class="paramtype">int&#160;</td>
  163. <td class="paramname"><em>default_port</em>&#160;</td>
  164. </tr>
  165. <tr>
  166. <td></td>
  167. <td>)</td>
  168. <td></td><td></td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. <p>Separates an address:port into two separate values. </p>
  173. <dl class="params"><dt>Parameters</dt><dd>
  174. <table class="params">
  175. <tr><td class="paramdir">[in]</td><td class="paramname">uri</td><td>the input string - hostname:port </td></tr>
  176. <tr><td class="paramdir">[out]</td><td class="paramname">port</td><td>the returned port integer </td></tr>
  177. <tr><td class="paramdir">[out]</td><td class="paramname">topic</td><td>optional topic portion of the address starting with '/' </td></tr>
  178. </table>
  179. </dd>
  180. </dl>
  181. <dl class="section return"><dt>Returns</dt><dd>the address string </dd></dl>
  182. </div>
  183. </div>
  184. <a id="ad9baf307647cbe6516eadbbe975cda8c"></a>
  185. <h2 class="memtitle"><span class="permalink"><a href="#ad9baf307647cbe6516eadbbe975cda8c">&#9670;&nbsp;</a></span>MQTTProtocol_connect()</h2>
  186. <div class="memitem">
  187. <div class="memproto">
  188. <table class="memname">
  189. <tr>
  190. <td class="memname">int MQTTProtocol_connect </td>
  191. <td>(</td>
  192. <td class="paramtype">const char *&#160;</td>
  193. <td class="paramname"><em>ip_address</em>, </td>
  194. </tr>
  195. <tr>
  196. <td class="paramkey"></td>
  197. <td></td>
  198. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  199. <td class="paramname"><em>aClient</em>, </td>
  200. </tr>
  201. <tr>
  202. <td class="paramkey"></td>
  203. <td></td>
  204. <td class="paramtype">int&#160;</td>
  205. <td class="paramname"><em>websocket</em>, </td>
  206. </tr>
  207. <tr>
  208. <td class="paramkey"></td>
  209. <td></td>
  210. <td class="paramtype">int&#160;</td>
  211. <td class="paramname"><em>MQTTVersion</em>, </td>
  212. </tr>
  213. <tr>
  214. <td class="paramkey"></td>
  215. <td></td>
  216. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  217. <td class="paramname"><em>connectProperties</em>, </td>
  218. </tr>
  219. <tr>
  220. <td class="paramkey"></td>
  221. <td></td>
  222. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  223. <td class="paramname"><em>willProperties</em>&#160;</td>
  224. </tr>
  225. <tr>
  226. <td></td>
  227. <td>)</td>
  228. <td></td><td></td>
  229. </tr>
  230. </table>
  231. </div><div class="memdoc">
  232. <p>MQTT outgoing connect processing for a client. </p>
  233. <dl class="params"><dt>Parameters</dt><dd>
  234. <table class="params">
  235. <tr><td class="paramname">ip_address</td><td>the TCP address:port to connect to </td></tr>
  236. <tr><td class="paramname">aClient</td><td>a structure with all MQTT data needed </td></tr>
  237. <tr><td class="paramname">int</td><td>ssl </td></tr>
  238. <tr><td class="paramname">int</td><td>MQTTVersion the MQTT version to connect with (3 or 4) </td></tr>
  239. <tr><td class="paramname">long</td><td>timeout how long to wait for a new socket to be created </td></tr>
  240. </table>
  241. </dd>
  242. </dl>
  243. <dl class="section return"><dt>Returns</dt><dd>return code </dd></dl>
  244. </div>
  245. </div>
  246. <a id="a4f914518a8e2d68cc9d9fbb2c22cdf6f"></a>
  247. <h2 class="memtitle"><span class="permalink"><a href="#a4f914518a8e2d68cc9d9fbb2c22cdf6f">&#9670;&nbsp;</a></span>MQTTProtocol_handleDisconnects()</h2>
  248. <div class="memitem">
  249. <div class="memproto">
  250. <table class="memname">
  251. <tr>
  252. <td class="memname">int MQTTProtocol_handleDisconnects </td>
  253. <td>(</td>
  254. <td class="paramtype">void *&#160;</td>
  255. <td class="paramname"><em>pack</em>, </td>
  256. </tr>
  257. <tr>
  258. <td class="paramkey"></td>
  259. <td></td>
  260. <td class="paramtype">SOCKET&#160;</td>
  261. <td class="paramname"><em>sock</em>&#160;</td>
  262. </tr>
  263. <tr>
  264. <td></td>
  265. <td>)</td>
  266. <td></td><td></td>
  267. </tr>
  268. </table>
  269. </div><div class="memdoc">
  270. <p>Process an incoming disconnect packet for a socket. </p>
  271. <dl class="params"><dt>Parameters</dt><dd>
  272. <table class="params">
  273. <tr><td class="paramname">pack</td><td>pointer to the disconnect packet </td></tr>
  274. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  275. </table>
  276. </dd>
  277. </dl>
  278. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  279. <div class="dynheader">
  280. Here is the call graph for this function:</div>
  281. <div class="dyncontent">
  282. <div class="center"><img src="MQTTProtocolOut_8c_a4f914518a8e2d68cc9d9fbb2c22cdf6f_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_a4f914518a8e2d68cc9d9fbb2c22cdf6f_cgraph" alt=""/></div>
  283. <map name="MQTTProtocolOut_8c_a4f914518a8e2d68cc9d9fbb2c22cdf6f_cgraph" id="MQTTProtocolOut_8c_a4f914518a8e2d68cc9d9fbb2c22cdf6f_cgraph">
  284. <area shape="rect" title="Process an incoming disconnect packet for a socket." alt="" coords="5,5,229,32"/>
  285. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="277,5,372,32"/>
  286. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="420,5,539,32"/>
  287. </map>
  288. </div>
  289. </div>
  290. </div>
  291. <a id="ad298c92c74b5f1acda774fc95e3d61c3"></a>
  292. <h2 class="memtitle"><span class="permalink"><a href="#ad298c92c74b5f1acda774fc95e3d61c3">&#9670;&nbsp;</a></span>MQTTProtocol_handlePingresps()</h2>
  293. <div class="memitem">
  294. <div class="memproto">
  295. <table class="memname">
  296. <tr>
  297. <td class="memname">int MQTTProtocol_handlePingresps </td>
  298. <td>(</td>
  299. <td class="paramtype">void *&#160;</td>
  300. <td class="paramname"><em>pack</em>, </td>
  301. </tr>
  302. <tr>
  303. <td class="paramkey"></td>
  304. <td></td>
  305. <td class="paramtype">SOCKET&#160;</td>
  306. <td class="paramname"><em>sock</em>&#160;</td>
  307. </tr>
  308. <tr>
  309. <td></td>
  310. <td>)</td>
  311. <td></td><td></td>
  312. </tr>
  313. </table>
  314. </div><div class="memdoc">
  315. <p>Process an incoming pingresp packet for a socket. </p>
  316. <dl class="params"><dt>Parameters</dt><dd>
  317. <table class="params">
  318. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  319. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  320. </table>
  321. </dd>
  322. </dl>
  323. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  324. <div class="dynheader">
  325. Here is the call graph for this function:</div>
  326. <div class="dyncontent">
  327. <div class="center"><img src="MQTTProtocolOut_8c_ad298c92c74b5f1acda774fc95e3d61c3_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_ad298c92c74b5f1acda774fc95e3d61c3_cgraph" alt=""/></div>
  328. <map name="MQTTProtocolOut_8c_ad298c92c74b5f1acda774fc95e3d61c3_cgraph" id="MQTTProtocolOut_8c_ad298c92c74b5f1acda774fc95e3d61c3_cgraph">
  329. <area shape="rect" title="Process an incoming pingresp packet for a socket." alt="" coords="5,5,216,32"/>
  330. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="264,5,359,32"/>
  331. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="407,5,525,32"/>
  332. </map>
  333. </div>
  334. </div>
  335. </div>
  336. <a id="a5424115bf427436c2d40058f15261ed0"></a>
  337. <h2 class="memtitle"><span class="permalink"><a href="#a5424115bf427436c2d40058f15261ed0">&#9670;&nbsp;</a></span>MQTTProtocol_handleSubacks()</h2>
  338. <div class="memitem">
  339. <div class="memproto">
  340. <table class="memname">
  341. <tr>
  342. <td class="memname">int MQTTProtocol_handleSubacks </td>
  343. <td>(</td>
  344. <td class="paramtype">void *&#160;</td>
  345. <td class="paramname"><em>pack</em>, </td>
  346. </tr>
  347. <tr>
  348. <td class="paramkey"></td>
  349. <td></td>
  350. <td class="paramtype">SOCKET&#160;</td>
  351. <td class="paramname"><em>sock</em>&#160;</td>
  352. </tr>
  353. <tr>
  354. <td></td>
  355. <td>)</td>
  356. <td></td><td></td>
  357. </tr>
  358. </table>
  359. </div><div class="memdoc">
  360. <p>Process an incoming suback packet for a socket. </p>
  361. <dl class="params"><dt>Parameters</dt><dd>
  362. <table class="params">
  363. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  364. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  365. </table>
  366. </dd>
  367. </dl>
  368. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  369. <div class="dynheader">
  370. Here is the call graph for this function:</div>
  371. <div class="dyncontent">
  372. <div class="center"><img src="MQTTProtocolOut_8c_a5424115bf427436c2d40058f15261ed0_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_a5424115bf427436c2d40058f15261ed0_cgraph" alt=""/></div>
  373. <map name="MQTTProtocolOut_8c_a5424115bf427436c2d40058f15261ed0_cgraph" id="MQTTProtocolOut_8c_a5424115bf427436c2d40058f15261ed0_cgraph">
  374. <area shape="rect" title="Process an incoming suback packet for a socket." alt="" coords="5,5,208,32"/>
  375. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="256,5,351,32"/>
  376. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="399,5,517,32"/>
  377. </map>
  378. </div>
  379. </div>
  380. </div>
  381. <a id="a0b9648549a1a132eecadb74df2e84f57"></a>
  382. <h2 class="memtitle"><span class="permalink"><a href="#a0b9648549a1a132eecadb74df2e84f57">&#9670;&nbsp;</a></span>MQTTProtocol_handleUnsubacks()</h2>
  383. <div class="memitem">
  384. <div class="memproto">
  385. <table class="memname">
  386. <tr>
  387. <td class="memname">int MQTTProtocol_handleUnsubacks </td>
  388. <td>(</td>
  389. <td class="paramtype">void *&#160;</td>
  390. <td class="paramname"><em>pack</em>, </td>
  391. </tr>
  392. <tr>
  393. <td class="paramkey"></td>
  394. <td></td>
  395. <td class="paramtype">SOCKET&#160;</td>
  396. <td class="paramname"><em>sock</em>&#160;</td>
  397. </tr>
  398. <tr>
  399. <td></td>
  400. <td>)</td>
  401. <td></td><td></td>
  402. </tr>
  403. </table>
  404. </div><div class="memdoc">
  405. <p>Process an incoming unsuback packet for a socket. </p>
  406. <dl class="params"><dt>Parameters</dt><dd>
  407. <table class="params">
  408. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  409. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  410. </table>
  411. </dd>
  412. </dl>
  413. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  414. <div class="dynheader">
  415. Here is the call graph for this function:</div>
  416. <div class="dyncontent">
  417. <div class="center"><img src="MQTTProtocolOut_8c_a0b9648549a1a132eecadb74df2e84f57_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_a0b9648549a1a132eecadb74df2e84f57_cgraph" alt=""/></div>
  418. <map name="MQTTProtocolOut_8c_a0b9648549a1a132eecadb74df2e84f57_cgraph" id="MQTTProtocolOut_8c_a0b9648549a1a132eecadb74df2e84f57_cgraph">
  419. <area shape="rect" title="Process an incoming unsuback packet for a socket." alt="" coords="5,5,224,32"/>
  420. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="272,5,367,32"/>
  421. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="415,5,533,32"/>
  422. </map>
  423. </div>
  424. </div>
  425. </div>
  426. <a id="a6b8949d7db9299fa5fd940e8e58f31b6"></a>
  427. <h2 class="memtitle"><span class="permalink"><a href="#a6b8949d7db9299fa5fd940e8e58f31b6">&#9670;&nbsp;</a></span>MQTTProtocol_specialChars()</h2>
  428. <div class="memitem">
  429. <div class="memproto">
  430. <table class="memname">
  431. <tr>
  432. <td class="memname">void MQTTProtocol_specialChars </td>
  433. <td>(</td>
  434. <td class="paramtype">char *&#160;</td>
  435. <td class="paramname"><em>p0</em>, </td>
  436. </tr>
  437. <tr>
  438. <td class="paramkey"></td>
  439. <td></td>
  440. <td class="paramtype">char *&#160;</td>
  441. <td class="paramname"><em>p1</em>, </td>
  442. </tr>
  443. <tr>
  444. <td class="paramkey"></td>
  445. <td></td>
  446. <td class="paramtype">b64_size_t *&#160;</td>
  447. <td class="paramname"><em>basic_auth_in_len</em>&#160;</td>
  448. </tr>
  449. <tr>
  450. <td></td>
  451. <td>)</td>
  452. <td></td><td></td>
  453. </tr>
  454. </table>
  455. </div><div class="memdoc">
  456. <p>Allow user or password characters to be expressed in the form of XX, XX being the hexadecimal value of the character. </p>
  457. <p>This will avoid problems when a user code or a password contains a '@' or another special character ('' included) </p><dl class="params"><dt>Parameters</dt><dd>
  458. <table class="params">
  459. <tr><td class="paramname">p0</td><td>output string </td></tr>
  460. <tr><td class="paramname">p1</td><td>input string </td></tr>
  461. <tr><td class="paramname">basic_auth_in_len</td><td></td></tr>
  462. </table>
  463. </dd>
  464. </dl>
  465. </div>
  466. </div>
  467. <a id="a460d021d06dd24cf975dfe20e17ab1ba"></a>
  468. <h2 class="memtitle"><span class="permalink"><a href="#a460d021d06dd24cf975dfe20e17ab1ba">&#9670;&nbsp;</a></span>MQTTProtocol_subscribe()</h2>
  469. <div class="memitem">
  470. <div class="memproto">
  471. <table class="memname">
  472. <tr>
  473. <td class="memname">int MQTTProtocol_subscribe </td>
  474. <td>(</td>
  475. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  476. <td class="paramname"><em>client</em>, </td>
  477. </tr>
  478. <tr>
  479. <td class="paramkey"></td>
  480. <td></td>
  481. <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
  482. <td class="paramname"><em>topics</em>, </td>
  483. </tr>
  484. <tr>
  485. <td class="paramkey"></td>
  486. <td></td>
  487. <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
  488. <td class="paramname"><em>qoss</em>, </td>
  489. </tr>
  490. <tr>
  491. <td class="paramkey"></td>
  492. <td></td>
  493. <td class="paramtype">int&#160;</td>
  494. <td class="paramname"><em>msgID</em>, </td>
  495. </tr>
  496. <tr>
  497. <td class="paramkey"></td>
  498. <td></td>
  499. <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *&#160;</td>
  500. <td class="paramname"><em>opts</em>, </td>
  501. </tr>
  502. <tr>
  503. <td class="paramkey"></td>
  504. <td></td>
  505. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  506. <td class="paramname"><em>props</em>&#160;</td>
  507. </tr>
  508. <tr>
  509. <td></td>
  510. <td>)</td>
  511. <td></td><td></td>
  512. </tr>
  513. </table>
  514. </div><div class="memdoc">
  515. <p>MQTT outgoing subscribe processing for a client. </p>
  516. <dl class="params"><dt>Parameters</dt><dd>
  517. <table class="params">
  518. <tr><td class="paramname">client</td><td>the client structure </td></tr>
  519. <tr><td class="paramname">topics</td><td>list of topics </td></tr>
  520. <tr><td class="paramname">qoss</td><td>corresponding list of QoSs </td></tr>
  521. <tr><td class="paramname">opts</td><td>MQTT 5.0 subscribe options </td></tr>
  522. <tr><td class="paramname">props</td><td>MQTT 5.0 subscribe properties </td></tr>
  523. </table>
  524. </dd>
  525. </dl>
  526. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  527. <div class="dynheader">
  528. Here is the call graph for this function:</div>
  529. <div class="dyncontent">
  530. <div class="center"><img src="MQTTProtocolOut_8c_a460d021d06dd24cf975dfe20e17ab1ba_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_a460d021d06dd24cf975dfe20e17ab1ba_cgraph" alt=""/></div>
  531. <map name="MQTTProtocolOut_8c_a460d021d06dd24cf975dfe20e17ab1ba_cgraph" id="MQTTProtocolOut_8c_a460d021d06dd24cf975dfe20e17ab1ba_cgraph">
  532. <area shape="rect" title="MQTT outgoing subscribe processing for a client." alt="" coords="5,132,176,159"/>
  533. <area shape="rect" href="MQTTPacketOut_8c.html#a90212ed29c311f52a1dce0617133b1a7" title="Send an MQTT subscribe packet down a socket." alt="" coords="224,132,423,159"/>
  534. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="479,5,597,32"/>
  535. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="516,56,560,83"/>
  536. <area shape="rect" href="MQTTPacket_8c.html#a51f58f1c7864f9fe87b55cc6ccb10129" title="Sends an MQTT packet in one system call write." alt="" coords="471,107,605,133"/>
  537. <area shape="rect" href="MQTTPacket_8c.html#ad29ec8b2fbf0ec0195621b44f8945923" title="Writes one character to an output buffer." alt="" coords="499,157,577,184"/>
  538. <area shape="rect" href="MQTTPacket_8c.html#a07aa0146eda3d32979142e7df8ad5fc3" title="Writes an integer as 2 bytes to an output buffer." alt="" coords="718,233,783,260"/>
  539. <area shape="rect" href="MQTTPacket_8c.html#af0fcaa11ac05ce448a433a53f9cae420" title="Writes a &quot;UTF&quot; string to an output buffer." alt="" coords="500,259,576,285"/>
  540. <area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="676,56,825,83"/>
  541. <area shape="rect" href="MQTTPersistence_8c.html#a18eab666c3e6aecd92a6c8f10df808e3" title="Adds a record to the persistent store." alt="" coords="653,107,848,133"/>
  542. <area shape="rect" href="MQTTPacket_8c.html#a132d2d5b304d37cd2348a973f7b315de" title="Calculates an integer from two bytes read from the input buffer." alt="" coords="719,157,782,184"/>
  543. </map>
  544. </div>
  545. </div>
  546. </div>
  547. <a id="a69083f5a059d129d1030140ec1cd3d58"></a>
  548. <h2 class="memtitle"><span class="permalink"><a href="#a69083f5a059d129d1030140ec1cd3d58">&#9670;&nbsp;</a></span>MQTTProtocol_unsubscribe()</h2>
  549. <div class="memitem">
  550. <div class="memproto">
  551. <table class="memname">
  552. <tr>
  553. <td class="memname">int MQTTProtocol_unsubscribe </td>
  554. <td>(</td>
  555. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  556. <td class="paramname"><em>client</em>, </td>
  557. </tr>
  558. <tr>
  559. <td class="paramkey"></td>
  560. <td></td>
  561. <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
  562. <td class="paramname"><em>topics</em>, </td>
  563. </tr>
  564. <tr>
  565. <td class="paramkey"></td>
  566. <td></td>
  567. <td class="paramtype">int&#160;</td>
  568. <td class="paramname"><em>msgID</em>, </td>
  569. </tr>
  570. <tr>
  571. <td class="paramkey"></td>
  572. <td></td>
  573. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  574. <td class="paramname"><em>props</em>&#160;</td>
  575. </tr>
  576. <tr>
  577. <td></td>
  578. <td>)</td>
  579. <td></td><td></td>
  580. </tr>
  581. </table>
  582. </div><div class="memdoc">
  583. <p>MQTT outgoing unsubscribe processing for a client. </p>
  584. <dl class="params"><dt>Parameters</dt><dd>
  585. <table class="params">
  586. <tr><td class="paramname">client</td><td>the client structure </td></tr>
  587. <tr><td class="paramname">topics</td><td>list of topics </td></tr>
  588. </table>
  589. </dd>
  590. </dl>
  591. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  592. <div class="dynheader">
  593. Here is the call graph for this function:</div>
  594. <div class="dyncontent">
  595. <div class="center"><img src="MQTTProtocolOut_8c_a69083f5a059d129d1030140ec1cd3d58_cgraph.png" border="0" usemap="#MQTTProtocolOut_8c_a69083f5a059d129d1030140ec1cd3d58_cgraph" alt=""/></div>
  596. <map name="MQTTProtocolOut_8c_a69083f5a059d129d1030140ec1cd3d58_cgraph" id="MQTTProtocolOut_8c_a69083f5a059d129d1030140ec1cd3d58_cgraph">
  597. <area shape="rect" title="MQTT outgoing unsubscribe processing for a client." alt="" coords="5,107,189,133"/>
  598. <area shape="rect" href="MQTTPacketOut_8c.html#a1ad4c9b76c6ab88c394ee925eb4dcd44" title="Send an MQTT unsubscribe packet down a socket." alt="" coords="237,107,449,133"/>
  599. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="505,5,624,32"/>
  600. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="543,56,587,83"/>
  601. <area shape="rect" href="MQTTPacket_8c.html#a51f58f1c7864f9fe87b55cc6ccb10129" title="Sends an MQTT packet in one system call write." alt="" coords="497,107,632,133"/>
  602. <area shape="rect" href="MQTTPacket_8c.html#a07aa0146eda3d32979142e7df8ad5fc3" title="Writes an integer as 2 bytes to an output buffer." alt="" coords="745,208,810,235"/>
  603. <area shape="rect" href="MQTTPacket_8c.html#af0fcaa11ac05ce448a433a53f9cae420" title="Writes a &quot;UTF&quot; string to an output buffer." alt="" coords="527,208,603,235"/>
  604. <area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="703,56,852,83"/>
  605. <area shape="rect" href="MQTTPersistence_8c.html#a18eab666c3e6aecd92a6c8f10df808e3" title="Adds a record to the persistent store." alt="" coords="680,107,875,133"/>
  606. <area shape="rect" href="MQTTPacket_8c.html#a132d2d5b304d37cd2348a973f7b315de" title="Calculates an integer from two bytes read from the input buffer." alt="" coords="746,157,809,184"/>
  607. </map>
  608. </div>
  609. </div>
  610. </div>
  611. </div><!-- contents -->
  612. <!-- start footer part -->
  613. <hr class="footer"/><address class="footer"><small>
  614. Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
  615. <img class="footer" src="doxygen.png" alt="doxygen"/>
  616. </a> 1.8.17
  617. </small></address>
  618. </body>
  619. </html>