pubasync.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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>Paho MQTT C Client Library: Asynchronous publication example</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">Paho MQTT C Client Library
  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="PageDoc"><div class="header">
  63. <div class="headertitle">
  64. <div class="title">Asynchronous publication example </div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <div class="textblock"><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
  68. <div class="line"><span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
  69. <div class="line"><span class="preprocessor">#include &lt;string.h&gt;</span></div>
  70. <div class="line"><span class="preprocessor">#include &quot;<a class="code" href="_m_q_t_t_client_8h.html">MQTTClient.h</a>&quot;</span></div>
  71. <div class="line"> </div>
  72. <div class="line"><span class="preprocessor">#if !defined(_WIN32)</span></div>
  73. <div class="line"><span class="preprocessor">#include &lt;unistd.h&gt;</span></div>
  74. <div class="line"><span class="preprocessor">#else</span></div>
  75. <div class="line"><span class="preprocessor">#include &lt;windows.h&gt;</span></div>
  76. <div class="line"><span class="preprocessor">#endif</span></div>
  77. <div class="line"> </div>
  78. <div class="line"><span class="preprocessor">#define ADDRESS &quot;tcp://mqtt.eclipseprojects.io:1883&quot;</span></div>
  79. <div class="line"><span class="preprocessor">#define CLIENTID &quot;ExampleClientPub&quot;</span></div>
  80. <div class="line"><span class="preprocessor">#define TOPIC &quot;MQTT Examples&quot;</span></div>
  81. <div class="line"><span class="preprocessor">#define PAYLOAD &quot;Hello World!&quot;</span></div>
  82. <div class="line"><span class="preprocessor">#define QOS 1</span></div>
  83. <div class="line"><span class="preprocessor">#define TIMEOUT 10000L</span></div>
  84. <div class="line"> </div>
  85. <div class="line"><a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> deliveredtoken;</div>
  86. <div class="line"> </div>
  87. <div class="line"><span class="keywordtype">void</span> delivered(<span class="keywordtype">void</span> *context, <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt)</div>
  88. <div class="line">{</div>
  89. <div class="line"> printf(<span class="stringliteral">&quot;Message with token value %d delivery confirmed\n&quot;</span>, dt);</div>
  90. <div class="line"> deliveredtoken = dt;</div>
  91. <div class="line">}</div>
  92. <div class="line"> </div>
  93. <div class="line"><span class="keywordtype">int</span> msgarrvd(<span class="keywordtype">void</span> *context, <span class="keywordtype">char</span> *topicName, <span class="keywordtype">int</span> topicLen, <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> *message)</div>
  94. <div class="line">{</div>
  95. <div class="line"> printf(<span class="stringliteral">&quot;Message arrived\n&quot;</span>);</div>
  96. <div class="line"> printf(<span class="stringliteral">&quot; topic: %s\n&quot;</span>, topicName);</div>
  97. <div class="line"> printf(<span class="stringliteral">&quot; message: %.*s\n&quot;</span>, message-&gt;<a class="code" href="struct_m_q_t_t_client__message.html#aa3cb44feb3ae6d11b3a4cad2d94cb33a">payloadlen</a>, (<span class="keywordtype">char</span>*)message-&gt;<a class="code" href="struct_m_q_t_t_client__message.html#a9eff55064941fb604452abb0050ea99d">payload</a>);</div>
  98. <div class="line"> <a class="code" href="_m_q_t_t_client_8h.html#abd8abde4f39d3e689029de27f7a98a65">MQTTClient_freeMessage</a>(&amp;message);</div>
  99. <div class="line"> <a class="code" href="_m_q_t_t_client_8h.html#a203b545c999beb6b825ec99b6aea79ab">MQTTClient_free</a>(topicName);</div>
  100. <div class="line"> <span class="keywordflow">return</span> 1;</div>
  101. <div class="line">}</div>
  102. <div class="line"> </div>
  103. <div class="line"><span class="keywordtype">void</span> connlost(<span class="keywordtype">void</span> *context, <span class="keywordtype">char</span> *cause)</div>
  104. <div class="line">{</div>
  105. <div class="line"> printf(<span class="stringliteral">&quot;\nConnection lost\n&quot;</span>);</div>
  106. <div class="line"> printf(<span class="stringliteral">&quot; cause: %s\n&quot;</span>, cause);</div>
  107. <div class="line">}</div>
  108. <div class="line"> </div>
  109. <div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div>
  110. <div class="line">{</div>
  111. <div class="line"> <a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> client;</div>
  112. <div class="line"> <a class="code" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a> conn_opts = <a class="code" href="_m_q_t_t_client_8h.html#aefd7c865f2641c8155b763fdf3061c25">MQTTClient_connectOptions_initializer</a>;</div>
  113. <div class="line"> <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> pubmsg = <a class="code" href="_m_q_t_t_client_8h.html#aa1fd995924d3df75959fcf57e87aefac">MQTTClient_message_initializer</a>;</div>
  114. <div class="line"> <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> token;</div>
  115. <div class="line"> <span class="keywordtype">int</span> rc;</div>
  116. <div class="line"> </div>
  117. <div class="line"> <span class="keywordflow">if</span> ((rc = <a class="code" href="_m_q_t_t_client_8h.html#a9a0518d9ca924d12c1329dbe3de5f2b6">MQTTClient_create</a>(&amp;client, ADDRESS, CLIENTID,</div>
  118. <div class="line"> <a class="code" href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a>, NULL)) != <a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>)</div>
  119. <div class="line"> {</div>
  120. <div class="line"> printf(<span class="stringliteral">&quot;Failed to create client, return code %d\n&quot;</span>, rc);</div>
  121. <div class="line"> rc = EXIT_FAILURE;</div>
  122. <div class="line"> <span class="keywordflow">goto</span> exit;</div>
  123. <div class="line"> }</div>
  124. <div class="line"> </div>
  125. <div class="line"> <span class="keywordflow">if</span> ((rc = <a class="code" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a>(client, NULL, connlost, msgarrvd, delivered)) != <a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>)</div>
  126. <div class="line"> {</div>
  127. <div class="line"> printf(<span class="stringliteral">&quot;Failed to set callbacks, return code %d\n&quot;</span>, rc);</div>
  128. <div class="line"> rc = EXIT_FAILURE;</div>
  129. <div class="line"> <span class="keywordflow">goto</span> destroy_exit;</div>
  130. <div class="line"> }</div>
  131. <div class="line"> </div>
  132. <div class="line"> conn_opts.<a class="code" href="struct_m_q_t_t_client__connect_options.html#ac8dd0930672a9c7d71fc645aa1f0521d">keepAliveInterval</a> = 20;</div>
  133. <div class="line"> conn_opts.<a class="code" href="struct_m_q_t_t_client__connect_options.html#a036c36a2a4d3a3ffae9ab4dd8b3e7f7b">cleansession</a> = 1;</div>
  134. <div class="line"> <span class="keywordflow">if</span> ((rc = <a class="code" href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a>(client, &amp;conn_opts)) != <a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>)</div>
  135. <div class="line"> {</div>
  136. <div class="line"> printf(<span class="stringliteral">&quot;Failed to connect, return code %d\n&quot;</span>, rc);</div>
  137. <div class="line"> rc = EXIT_FAILURE;</div>
  138. <div class="line"> <span class="keywordflow">goto</span> destroy_exit;</div>
  139. <div class="line"> }</div>
  140. <div class="line"> </div>
  141. <div class="line"> pubmsg.<a class="code" href="struct_m_q_t_t_client__message.html#a9eff55064941fb604452abb0050ea99d">payload</a> = PAYLOAD;</div>
  142. <div class="line"> pubmsg.<a class="code" href="struct_m_q_t_t_client__message.html#aa3cb44feb3ae6d11b3a4cad2d94cb33a">payloadlen</a> = (int)strlen(PAYLOAD);</div>
  143. <div class="line"> pubmsg.<a class="code" href="struct_m_q_t_t_client__message.html#a35738099155a0e4f54050da474bab2e7">qos</a> = QOS;</div>
  144. <div class="line"> pubmsg.<a class="code" href="struct_m_q_t_t_client__message.html#a6a4904c112507a43e7dc8495b62cc0fc">retained</a> = 0;</div>
  145. <div class="line"> deliveredtoken = 0;</div>
  146. <div class="line"> <span class="keywordflow">if</span> ((rc = <a class="code" href="_m_q_t_t_client_8h.html#ace320b8a92c7087d9dd5cf242d50389d">MQTTClient_publishMessage</a>(client, TOPIC, &amp;pubmsg, &amp;token)) != <a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>)</div>
  147. <div class="line"> {</div>
  148. <div class="line"> printf(<span class="stringliteral">&quot;Failed to publish message, return code %d\n&quot;</span>, rc);</div>
  149. <div class="line"> rc = EXIT_FAILURE;</div>
  150. <div class="line"> }</div>
  151. <div class="line"> <span class="keywordflow">else</span></div>
  152. <div class="line"> {</div>
  153. <div class="line"> printf(<span class="stringliteral">&quot;Waiting for publication of %s\n&quot;</span></div>
  154. <div class="line"> <span class="stringliteral">&quot;on topic %s for client with ClientID: %s\n&quot;</span>,</div>
  155. <div class="line"> PAYLOAD, TOPIC, CLIENTID);</div>
  156. <div class="line"> <span class="keywordflow">while</span> (deliveredtoken != token)</div>
  157. <div class="line"> {</div>
  158. <div class="line"><span class="preprocessor"> #if defined(_WIN32)</span></div>
  159. <div class="line"> Sleep(100);</div>
  160. <div class="line"><span class="preprocessor"> #else</span></div>
  161. <div class="line"> usleep(10000L);</div>
  162. <div class="line"><span class="preprocessor"> #endif</span></div>
  163. <div class="line"> }</div>
  164. <div class="line"> }</div>
  165. <div class="line"> </div>
  166. <div class="line"> <span class="keywordflow">if</span> ((rc = <a class="code" href="_m_q_t_t_client_8h.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a>(client, 10000)) != <a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>)</div>
  167. <div class="line"> {</div>
  168. <div class="line"> printf(<span class="stringliteral">&quot;Failed to disconnect, return code %d\n&quot;</span>, rc);</div>
  169. <div class="line"> rc = EXIT_FAILURE;</div>
  170. <div class="line"> }</div>
  171. <div class="line"> </div>
  172. <div class="line">destroy_exit:</div>
  173. <div class="line"> <a class="code" href="_m_q_t_t_client_8h.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a>(&amp;client);</div>
  174. <div class="line"> </div>
  175. <div class="line">exit:</div>
  176. <div class="line"> <span class="keywordflow">return</span> rc;</div>
  177. <div class="line">}</div>
  178. </div><!-- fragment --> </div></div><!-- contents -->
  179. </div><!-- PageDoc -->
  180. <div class="ttc" id="astruct_m_q_t_t_client__message_html_a6a4904c112507a43e7dc8495b62cc0fc"><div class="ttname"><a href="struct_m_q_t_t_client__message.html#a6a4904c112507a43e7dc8495b62cc0fc">MQTTClient_message::retained</a></div><div class="ttdeci">int retained</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:314</div></div>
  181. <div class="ttc" id="a_m_q_t_t_client_8h_html_aa1fd995924d3df75959fcf57e87aefac"><div class="ttname"><a href="_m_q_t_t_client_8h.html#aa1fd995924d3df75959fcf57e87aefac">MQTTClient_message_initializer</a></div><div class="ttdeci">#define MQTTClient_message_initializer</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:332</div></div>
  182. <div class="ttc" id="astruct_m_q_t_t_client__connect_options_html_ac8dd0930672a9c7d71fc645aa1f0521d"><div class="ttname"><a href="struct_m_q_t_t_client__connect_options.html#ac8dd0930672a9c7d71fc645aa1f0521d">MQTTClient_connectOptions::keepAliveInterval</a></div><div class="ttdeci">int keepAliveInterval</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:848</div></div>
  183. <div class="ttc" id="astruct_m_q_t_t_client__message_html_aa3cb44feb3ae6d11b3a4cad2d94cb33a"><div class="ttname"><a href="struct_m_q_t_t_client__message.html#aa3cb44feb3ae6d11b3a4cad2d94cb33a">MQTTClient_message::payloadlen</a></div><div class="ttdeci">int payloadlen</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:279</div></div>
  184. <div class="ttc" id="a_m_q_t_t_client_8h_html_abd8abde4f39d3e689029de27f7a98a65"><div class="ttname"><a href="_m_q_t_t_client_8h.html#abd8abde4f39d3e689029de27f7a98a65">MQTTClient_freeMessage</a></div><div class="ttdeci">void MQTTClient_freeMessage(MQTTClient_message **msg)</div></div>
  185. <div class="ttc" id="a_m_q_t_t_client_persistence_8h_html_ae01e089313a65ac4661ed216b6ac00fa"><div class="ttname"><a href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a></div><div class="ttdeci">#define MQTTCLIENT_PERSISTENCE_NONE</div><div class="ttdef"><b>Definition:</b> MQTTClientPersistence.h:74</div></div>
  186. <div class="ttc" id="astruct_m_q_t_t_client__message_html"><div class="ttname"><a href="struct_m_q_t_t_client__message.html">MQTTClient_message</a></div><div class="ttdef"><b>Definition:</b> MQTTClient.h:271</div></div>
  187. <div class="ttc" id="a_m_q_t_t_client_8h_html_aefd7c865f2641c8155b763fdf3061c25"><div class="ttname"><a href="_m_q_t_t_client_8h.html#aefd7c865f2641c8155b763fdf3061c25">MQTTClient_connectOptions_initializer</a></div><div class="ttdeci">#define MQTTClient_connectOptions_initializer</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:982</div></div>
  188. <div class="ttc" id="astruct_m_q_t_t_client__message_html_a35738099155a0e4f54050da474bab2e7"><div class="ttname"><a href="struct_m_q_t_t_client__message.html#a35738099155a0e4f54050da474bab2e7">MQTTClient_message::qos</a></div><div class="ttdeci">int qos</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:295</div></div>
  189. <div class="ttc" id="a_m_q_t_t_client_8h_html_a73e49030fd8b7074aa1aa45669b7fe8d"><div class="ttname"><a href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a></div><div class="ttdeci">int MQTTClient_deliveryToken</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:262</div></div>
  190. <div class="ttc" id="a_m_q_t_t_client_8h_html_aad27d07782991a4937ebf2f39a021f83"><div class="ttname"><a href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a></div><div class="ttdeci">int MQTTClient_setCallbacks(MQTTClient handle, void *context, MQTTClient_connectionLost *cl, MQTTClient_messageArrived *ma, MQTTClient_deliveryComplete *dc)</div></div>
  191. <div class="ttc" id="astruct_m_q_t_t_client__message_html_a9eff55064941fb604452abb0050ea99d"><div class="ttname"><a href="struct_m_q_t_t_client__message.html#a9eff55064941fb604452abb0050ea99d">MQTTClient_message::payload</a></div><div class="ttdeci">void * payload</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:281</div></div>
  192. <div class="ttc" id="a_m_q_t_t_client_8h_html_a7649e3913f9a216424d296f88a969c59"><div class="ttname"><a href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a></div><div class="ttdeci">void * MQTTClient</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:251</div></div>
  193. <div class="ttc" id="a_m_q_t_t_client_8h_html_acba095704d79e5a1996389fa26203f73"><div class="ttname"><a href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a></div><div class="ttdeci">#define MQTTCLIENT_SUCCESS</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:132</div></div>
  194. <div class="ttc" id="a_m_q_t_t_client_8h_html_ae700c3f5cfea3813264ce95e7c8cf498"><div class="ttname"><a href="_m_q_t_t_client_8h.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a></div><div class="ttdeci">void MQTTClient_destroy(MQTTClient *handle)</div></div>
  195. <div class="ttc" id="astruct_m_q_t_t_client__connect_options_html"><div class="ttname"><a href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a></div><div class="ttdef"><b>Definition:</b> MQTTClient.h:824</div></div>
  196. <div class="ttc" id="a_m_q_t_t_client_8h_html_ace320b8a92c7087d9dd5cf242d50389d"><div class="ttname"><a href="_m_q_t_t_client_8h.html#ace320b8a92c7087d9dd5cf242d50389d">MQTTClient_publishMessage</a></div><div class="ttdeci">int MQTTClient_publishMessage(MQTTClient handle, const char *topicName, MQTTClient_message *msg, MQTTClient_deliveryToken *dt)</div></div>
  197. <div class="ttc" id="a_m_q_t_t_client_8h_html_aaa8ae61cd65c9dc0846df10122d7bd4e"><div class="ttname"><a href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a></div><div class="ttdeci">int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions *options)</div></div>
  198. <div class="ttc" id="a_m_q_t_t_client_8h_html_a1e4d90c13a3c0705bc4a13bfe64e6525"><div class="ttname"><a href="_m_q_t_t_client_8h.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a></div><div class="ttdeci">int MQTTClient_disconnect(MQTTClient handle, int timeout)</div></div>
  199. <div class="ttc" id="astruct_m_q_t_t_client__connect_options_html_a036c36a2a4d3a3ffae9ab4dd8b3e7f7b"><div class="ttname"><a href="struct_m_q_t_t_client__connect_options.html#a036c36a2a4d3a3ffae9ab4dd8b3e7f7b">MQTTClient_connectOptions::cleansession</a></div><div class="ttdeci">int cleansession</div><div class="ttdef"><b>Definition:</b> MQTTClient.h:870</div></div>
  200. <div class="ttc" id="a_m_q_t_t_client_8h_html_a203b545c999beb6b825ec99b6aea79ab"><div class="ttname"><a href="_m_q_t_t_client_8h.html#a203b545c999beb6b825ec99b6aea79ab">MQTTClient_free</a></div><div class="ttdeci">void MQTTClient_free(void *ptr)</div></div>
  201. <div class="ttc" id="a_m_q_t_t_client_8h_html"><div class="ttname"><a href="_m_q_t_t_client_8h.html">MQTTClient.h</a></div></div>
  202. <div class="ttc" id="a_m_q_t_t_client_8h_html_a9a0518d9ca924d12c1329dbe3de5f2b6"><div class="ttname"><a href="_m_q_t_t_client_8h.html#a9a0518d9ca924d12c1329dbe3de5f2b6">MQTTClient_create</a></div><div class="ttdeci">int MQTTClient_create(MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)</div></div>
  203. <!-- start footer part -->
  204. <hr class="footer"/><address class="footer"><small>
  205. Generated on Thu Sep 29 2022 11:34:45 for Paho MQTT C Client Library by &#160;<a href="http://www.doxygen.org/index.html">
  206. <img class="footer" src="doxygen.png" alt="doxygen"/>
  207. </a> 1.8.17
  208. </small></address>
  209. </body>
  210. </html>