MQTTClient_8c.html 167 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287
  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: MQTTClient.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="#nested-classes">Data Structures</a> &#124;
  65. <a href="#define-members">Macros</a> &#124;
  66. <a href="#func-members">Functions</a> &#124;
  67. <a href="#var-members">Variables</a> </div>
  68. <div class="headertitle">
  69. <div class="title">MQTTClient.c File Reference</div> </div>
  70. </div><!--header-->
  71. <div class="contents">
  72. <p>Synchronous API implementation.
  73. <a href="#details">More...</a></p>
  74. <div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
  75. <code>#include &lt;string.h&gt;</code><br />
  76. <code>#include &lt;sys/time.h&gt;</code><br />
  77. <code>#include &quot;MQTTClient.h&quot;</code><br />
  78. <code>#include &quot;MQTTPersistence.h&quot;</code><br />
  79. <code>#include &quot;utf-8.h&quot;</code><br />
  80. <code>#include &quot;MQTTProtocol.h&quot;</code><br />
  81. <code>#include &quot;MQTTProtocolOut.h&quot;</code><br />
  82. <code>#include &quot;Thread.h&quot;</code><br />
  83. <code>#include &quot;SocketBuffer.h&quot;</code><br />
  84. <code>#include &quot;StackTrace.h&quot;</code><br />
  85. <code>#include &quot;Heap.h&quot;</code><br />
  86. <code>#include &quot;OsWrapper.h&quot;</code><br />
  87. <code>#include &quot;VersionInfo.h&quot;</code><br />
  88. <code>#include &quot;WebSocket.h&quot;</code><br />
  89. <code>#include &quot;Proxy.h&quot;</code><br />
  90. </div><div class="textblock"><div class="dynheader">
  91. Include dependency graph for MQTTClient.c:</div>
  92. <div class="dyncontent">
  93. <div class="center"><img src="MQTTClient_8c__incl.png" border="0" usemap="#MQTTClient_8c" alt=""/></div>
  94. <map name="MQTTClient_8c" id="MQTTClient_8c">
  95. <area shape="rect" title="Synchronous API implementation." alt="" coords="121,5,224,32"/>
  96. <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
  97. <area shape="rect" title=" " alt="" coords="93,80,157,107"/>
  98. <area shape="rect" title=" " alt="" coords="181,80,263,107"/>
  99. <area shape="rect" title=" " alt="" coords="287,80,386,107"/>
  100. </map>
  101. </div>
  102. </div><table class="memberdecls">
  103. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  104. Data Structures</h2></td></tr>
  105. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structqEntry.html">qEntry</a></td></tr>
  106. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClients.html">MQTTClients</a></td></tr>
  108. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structprops__rc__parms.html">props_rc_parms</a></td></tr>
  110. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. </table><table class="memberdecls">
  112. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  113. Macros</h2></td></tr>
  114. <tr class="memitem:a62b7ecff86a928a545160725cc9e2430"><td class="memItemLeft" align="right" valign="top"><a id="a62b7ecff86a928a545160725cc9e2430"></a>
  115. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_SSL</b>&#160;&#160;&#160;&quot;ssl://&quot;</td></tr>
  116. <tr class="separator:a62b7ecff86a928a545160725cc9e2430"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:ab0a2eaec459e41189e500536109bbe85"><td class="memItemLeft" align="right" valign="top"><a id="ab0a2eaec459e41189e500536109bbe85"></a>
  118. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_MQTTS</b>&#160;&#160;&#160;&quot;mqtts://&quot;</td></tr>
  119. <tr class="separator:ab0a2eaec459e41189e500536109bbe85"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memItemLeft" align="right" valign="top"><a id="aff8054f166c9eb81b4e7695bc7f1ec79"></a>
  121. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_TCP</b>&#160;&#160;&#160;&quot;tcp://&quot;</td></tr>
  122. <tr class="separator:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memItemLeft" align="right" valign="top"><a id="a61fc7ec5121ebee456c2f4bf445e5965"></a>
  124. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_MQTT</b>&#160;&#160;&#160;&quot;mqtt://&quot;</td></tr>
  125. <tr class="separator:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a5771cb458542c28e7bd49a92f2840828"><td class="memItemLeft" align="right" valign="top"><a id="a5771cb458542c28e7bd49a92f2840828"></a>
  127. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_WS</b>&#160;&#160;&#160;&quot;ws://&quot;</td></tr>
  128. <tr class="separator:a5771cb458542c28e7bd49a92f2840828"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:adba1cd25f9e81e0d2b88c905896efb81"><td class="memItemLeft" align="right" valign="top"><a id="adba1cd25f9e81e0d2b88c905896efb81"></a>
  130. #define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_WSS</b>&#160;&#160;&#160;&quot;wss://&quot;</td></tr>
  131. <tr class="separator:adba1cd25f9e81e0d2b88c905896efb81"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memItemLeft" align="right" valign="top"><a id="a9aa60e1ead64be77ad551e745cbfd4d3"></a>
  133. #define&#160;</td><td class="memItemRight" valign="bottom"><b>WINAPI</b></td></tr>
  134. <tr class="separator:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a48e5d65228327c5f6ad9503b0a72db32"><td class="memItemLeft" align="right" valign="top"><a id="a48e5d65228327c5f6ad9503b0a72db32"></a>
  136. #define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_INFO_STRINGS</b>&#160;&#160;&#160;8</td></tr>
  137. <tr class="separator:a48e5d65228327c5f6ad9503b0a72db32"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. </table><table class="memberdecls">
  139. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  140. Functions</h2></td></tr>
  141. <tr class="memitem:a4ea0fd02f2e44f48a3285a9191861373"><td class="memItemLeft" align="right" valign="top"><a id="a4ea0fd02f2e44f48a3285a9191861373"></a>
  142. int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_init</b> (void)</td></tr>
  143. <tr class="separator:a4ea0fd02f2e44f48a3285a9191861373"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:a21804ede1a506d1d69a472bc30acc8ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a21804ede1a506d1d69a472bc30acc8ba">MQTTClient_global_init</a> (<a class="el" href="structMQTTClient__init__options.html">MQTTClient_init_options</a> *inits)</td></tr>
  145. <tr class="memdesc:a21804ede1a506d1d69a472bc30acc8ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global init of mqtt library. <a href="MQTTClient_8c.html#a21804ede1a506d1d69a472bc30acc8ba">More...</a><br /></td></tr>
  146. <tr class="separator:a21804ede1a506d1d69a472bc30acc8ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:ae32040ed631457a2881fc0ec456a1daf"><td class="memItemLeft" align="right" valign="top"><a id="ae32040ed631457a2881fc0ec456a1daf"></a>
  148. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_terminate</b> (void)</td></tr>
  149. <tr class="separator:ae32040ed631457a2881fc0ec456a1daf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:ab22f406368730d3782d299bdc12277c9"><td class="memItemLeft" align="right" valign="top"><a id="ab22f406368730d3782d299bdc12277c9"></a>
  151. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_emptyMessageQueue</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
  152. <tr class="separator:ab22f406368730d3782d299bdc12277c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memItemLeft" align="right" valign="top"><a id="a2f68a4519b5e0dc57a1d3ead092b52e4"></a>
  154. static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_deliverMessage</b> (int rc, <a class="el" href="structMQTTClients.html">MQTTClients</a> *m, char **topicName, int *topicLen, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message)</td></tr>
  155. <tr class="separator:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ac35494adea1f11d3480b50b8a7f0c17d">clientSockCompare</a> (void *a, void *b)</td></tr>
  157. <tr class="memdesc:ac35494adea1f11d3480b50b8a7f0c17d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing clients by socket. <a href="MQTTClient_8c.html#ac35494adea1f11d3480b50b8a7f0c17d">More...</a><br /></td></tr>
  158. <tr class="separator:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <tr class="memitem:a0c0d8194bf8a449928881cf83276728e"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a0c0d8194bf8a449928881cf83276728e">connectionLost_call</a> (void *context)</td></tr>
  160. <tr class="memdesc:a0c0d8194bf8a449928881cf83276728e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper function to call connection lost on a separate thread. <a href="MQTTClient_8c.html#a0c0d8194bf8a449928881cf83276728e">More...</a><br /></td></tr>
  161. <tr class="separator:a0c0d8194bf8a449928881cf83276728e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. <tr class="memitem:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memItemLeft" align="right" valign="top"><a id="a60a613bf8f5dc3d15687ead12b57a5c1"></a>
  163. static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_run</b> (void *n)</td></tr>
  164. <tr class="separator:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  165. <tr class="memitem:a901ba852d2bc777276dfcf6dd834388b"><td class="memItemLeft" align="right" valign="top"><a id="a901ba852d2bc777276dfcf6dd834388b"></a>
  166. static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_stop</b> (void)</td></tr>
  167. <tr class="separator:a901ba852d2bc777276dfcf6dd834388b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a3d115d3279d50ec207fa958ebe14c07c"><td class="memItemLeft" align="right" valign="top"><a id="a3d115d3279d50ec207fa958ebe14c07c"></a>
  169. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_closeSession</b> (<a class="el" href="structClients.html">Clients</a> *client, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  170. <tr class="separator:a3d115d3279d50ec207fa958ebe14c07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  171. <tr class="memitem:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memItemLeft" align="right" valign="top"><a id="a03c6f9caa8b75bdcd0d536141ddd8add"></a>
  172. static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_cleanSession</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
  173. <tr class="separator:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. <tr class="memitem:a4bbe92af0878c896f94855961e31d1d1"><td class="memItemLeft" align="right" valign="top"><a id="a4bbe92af0878c896f94855961e31d1d1"></a>
  175. static <a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectURIVersion</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, const char *serverURI, int MQTTVersion, START_TIME_TYPE start, ELAPSED_TIME_TYPE millisecsTimeout, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
  176. <tr class="separator:a4bbe92af0878c896f94855961e31d1d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  177. <tr class="memitem:a92e78761bef2163632e18e297bc29be5"><td class="memItemLeft" align="right" valign="top"><a id="a92e78761bef2163632e18e297bc29be5"></a>
  178. static <a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectURI</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, const char *serverURI, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
  179. <tr class="separator:a92e78761bef2163632e18e297bc29be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  180. <tr class="memitem:a2eeb63b405d9aed880a79b38addf6df7"><td class="memItemLeft" align="right" valign="top"><a id="a2eeb63b405d9aed880a79b38addf6df7"></a>
  181. static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2eeb63b405d9aed880a79b38addf6df7">MQTTClient_disconnect1</a> (MQTTClient handle, int timeout, int call_connection_lost, int stop, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  182. <tr class="memdesc:a2eeb63b405d9aed880a79b38addf6df7"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
  183. <tr class="separator:a2eeb63b405d9aed880a79b38addf6df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memItemLeft" align="right" valign="top"><a id="a6a08562ce9b763bf79c71029b94cd9f5"></a>
  185. static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6a08562ce9b763bf79c71029b94cd9f5">MQTTClient_disconnect_internal</a> (MQTTClient handle, int timeout)</td></tr>
  186. <tr class="memdesc:a6a08562ce9b763bf79c71029b94cd9f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
  187. <tr class="separator:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:a355caa079d8293b37b8e2c9c367e4563"><td class="memItemLeft" align="right" valign="top"><a id="a355caa079d8293b37b8e2c9c367e4563"></a>
  189. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_retry</b> (void)</td></tr>
  190. <tr class="separator:a355caa079d8293b37b8e2c9c367e4563"><td class="memSeparator" colspan="2">&#160;</td></tr>
  191. <tr class="memitem:a872934d31b4a5e81ad329496dfcbe629"><td class="memItemLeft" align="right" valign="top"><a id="a872934d31b4a5e81ad329496dfcbe629"></a>
  192. static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_cycle</b> (SOCKET *sock, ELAPSED_TIME_TYPE timeout, int *rc)</td></tr>
  193. <tr class="separator:a872934d31b4a5e81ad329496dfcbe629"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. <tr class="memitem:a61a15c5181fd620f696fb91d05303cd3"><td class="memItemLeft" align="right" valign="top"><a id="a61a15c5181fd620f696fb91d05303cd3"></a>
  195. static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_waitfor</b> (MQTTClient handle, int packet_type, int *rc, int64_t timeout)</td></tr>
  196. <tr class="separator:a61a15c5181fd620f696fb91d05303cd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  197. <tr class="memitem:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#acdcf1aefca1dbb3d1b3d36c9bbaf3760">MQTTProtocol_checkPendingWrites</a> (void)</td></tr>
  198. <tr class="memdesc:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="mdescLeft">&#160;</td><td class="mdescRight">See if any pending writes have been completed, and cleanup if so. <a href="MQTTClient_8c.html#acdcf1aefca1dbb3d1b3d36c9bbaf3760">More...</a><br /></td></tr>
  199. <tr class="separator:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memSeparator" colspan="2">&#160;</td></tr>
  200. <tr class="memitem:a208d79938a67d7ba66284ad3d2d0819b"><td class="memItemLeft" align="right" valign="top"><a id="a208d79938a67d7ba66284ad3d2d0819b"></a>
  201. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_writeComplete</b> (SOCKET socket, int rc)</td></tr>
  202. <tr class="separator:a208d79938a67d7ba66284ad3d2d0819b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  203. <tr class="memitem:ade24f717a9b39d38b081e1d5e0db1661"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661">MQTTClient_createWithOptions</a> (MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, <a class="el" href="structMQTTClient__createOptions.html">MQTTClient_createOptions</a> *options)</td></tr>
  204. <tr class="memdesc:ade24f717a9b39d38b081e1d5e0db1661"><td class="mdescLeft">&#160;</td><td class="mdescRight">A version of :<a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a> with additional options. <a href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661">More...</a><br /></td></tr>
  205. <tr class="separator:ade24f717a9b39d38b081e1d5e0db1661"><td class="memSeparator" colspan="2">&#160;</td></tr>
  206. <tr class="memitem:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6">MQTTClient_create</a> (MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)</td></tr>
  207. <tr class="memdesc:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>). <a href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6">More...</a><br /></td></tr>
  208. <tr class="separator:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  209. <tr class="memitem:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a> (MQTTClient *handle)</td></tr>
  210. <tr class="memdesc:ae700c3f5cfea3813264ce95e7c8cf498"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees the memory allocated to an MQTT client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>). <a href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498">More...</a><br /></td></tr>
  211. <tr class="separator:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31">MQTTClient_freeMessage</a> (<a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message)</td></tr>
  213. <tr class="memdesc:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload. <a href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31">More...</a><br /></td></tr>
  214. <tr class="separator:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memSeparator" colspan="2">&#160;</td></tr>
  215. <tr class="memitem:ab217acbfaf47603355ca430983f93095"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095">MQTTClient_free</a> (void *memory)</td></tr>
  216. <tr class="memdesc:ab217acbfaf47603355ca430983f93095"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees memory allocated by the MQTT C client library, especially the topic name. <a href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095">More...</a><br /></td></tr>
  217. <tr class="separator:ab217acbfaf47603355ca430983f93095"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. <tr class="memitem:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a01bd2c5f98ec5c0636a106db33f2b01b">MQTTResponse_free</a> (<a class="el" href="structMQTTResponse.html">MQTTResponse</a> response)</td></tr>
  219. <tr class="memdesc:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the storage associated with the MQTT response. <a href="MQTTClient_8c.html#a01bd2c5f98ec5c0636a106db33f2b01b">More...</a><br /></td></tr>
  220. <tr class="separator:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  221. <tr class="memitem:adc7d708419664670063a0e7fd9c27bca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#adc7d708419664670063a0e7fd9c27bca">MQTTClient_setDisconnected</a> (MQTTClient handle, void *context, MQTTClient_disconnected *disconnected)</td></tr>
  222. <tr class="memdesc:adc7d708419664670063a0e7fd9c27bca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the MQTTClient_disconnected() callback function for a client. <a href="MQTTClient_8c.html#adc7d708419664670063a0e7fd9c27bca">More...</a><br /></td></tr>
  223. <tr class="separator:adc7d708419664670063a0e7fd9c27bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  224. <tr class="memitem:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">call_disconnected</a> (void *context)</td></tr>
  225. <tr class="memdesc:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper function to call disconnected on a separate thread. <a href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">More...</a><br /></td></tr>
  226. <tr class="separator:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  227. <tr class="memitem:aa594a18474baa9308cb407052d24739d"><td class="memItemLeft" align="right" valign="top"><a id="aa594a18474baa9308cb407052d24739d"></a>
  228. int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_setPublished</b> (MQTTClient handle, void *context, MQTTClient_published *published)</td></tr>
  229. <tr class="separator:aa594a18474baa9308cb407052d24739d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  230. <tr class="memitem:aad27d07782991a4937ebf2f39a021f83"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a> (MQTTClient handle, void *context, MQTTClient_connectionLost *cl, MQTTClient_messageArrived *ma, MQTTClient_deliveryComplete *dc)</td></tr>
  231. <tr class="memdesc:aad27d07782991a4937ebf2f39a021f83"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the callback functions for a specific client. <a href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83">More...</a><br /></td></tr>
  232. <tr class="separator:aad27d07782991a4937ebf2f39a021f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
  233. <tr class="memitem:a7bf816770b1661fdb62497f44304115e"><td class="memItemLeft" align="right" valign="top"><a id="a7bf816770b1661fdb62497f44304115e"></a>
  234. void&#160;</td><td class="memItemRight" valign="bottom"><b>Protocol_processPublication</b> (<a class="el" href="structPublish.html">Publish</a> *publish, <a class="el" href="structClients.html">Clients</a> *client, int allocatePayload)</td></tr>
  235. <tr class="separator:a7bf816770b1661fdb62497f44304115e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  236. <tr class="memitem:ae8220920e5aeccd2bc98fe480793cdae"><td class="memItemLeft" align="right" valign="top"><a id="ae8220920e5aeccd2bc98fe480793cdae"></a>
  237. void&#160;</td><td class="memItemRight" valign="bottom"><b>setRetryLoopInterval</b> (int keepalive)</td></tr>
  238. <tr class="separator:ae8220920e5aeccd2bc98fe480793cdae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  239. <tr class="memitem:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memItemLeft" align="right" valign="top"><a id="a529ee52c97ce7776a5e5ab429da40b7d"></a>
  240. <a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectAll</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
  241. <tr class="separator:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  242. <tr class="memitem:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options)</td></tr>
  243. <tr class="memdesc:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using the specified options. <a href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e">More...</a><br /></td></tr>
  244. <tr class="separator:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  245. <tr class="memitem:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aa777f80cb3eec5610f976aff30b8c0d6">MQTTClient_connect5</a> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
  246. <tr class="memdesc:aa777f80cb3eec5610f976aff30b8c0d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using MQTT version 5.0 and the specified options. <a href="MQTTClient_8c.html#aa777f80cb3eec5610f976aff30b8c0d6">More...</a><br /></td></tr>
  247. <tr class="separator:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  248. <tr class="memitem:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memItemLeft" align="right" valign="top"><a id="a9f7b0789ff9ca9ded72dbad2e747b333"></a>
  249. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9f7b0789ff9ca9ded72dbad2e747b333">MQTTProtocol_closeSession</a> (<a class="el" href="structClients.html">Clients</a> *c, int sendwill)</td></tr>
  250. <tr class="memdesc:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
  251. <tr class="separator:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memSeparator" colspan="2">&#160;</td></tr>
  252. <tr class="memitem:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a> (MQTTClient handle, int timeout)</td></tr>
  253. <tr class="memdesc:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to disconnect the client from the MQTT server. <a href="MQTTClient_8c.html#a1e4d90c13a3c0705bc4a13bfe64e6525">More...</a><br /></td></tr>
  254. <tr class="separator:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memSeparator" colspan="2">&#160;</td></tr>
  255. <tr class="memitem:a1762c469715b7f718c4e63a427e6c13c"><td class="memItemLeft" align="right" valign="top"><a id="a1762c469715b7f718c4e63a427e6c13c"></a>
  256. int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_disconnect5</b> (MQTTClient handle, int timeout, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  257. <tr class="separator:a1762c469715b7f718c4e63a427e6c13c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  258. <tr class="memitem:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">MQTTClient_isConnected</a> (MQTTClient handle)</td></tr>
  259. <tr class="memdesc:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function allows the client application to test whether or not a client is currently connected to the MQTT server. <a href="MQTTClient_8c.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">More...</a><br /></td></tr>
  260. <tr class="separator:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  261. <tr class="memitem:a5390c2402f135c12826ffbf6fc261f7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c">MQTTClient_subscribeMany5</a> (MQTTClient handle, int count, char *const *topic, int *qos, <a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *opts, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  262. <tr class="memdesc:a5390c2402f135c12826ffbf6fc261f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe an MQTT version 5.0 client to a list of topics, which may contain wildcards (see wildcard). <a href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c">More...</a><br /></td></tr>
  263. <tr class="separator:a5390c2402f135c12826ffbf6fc261f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  264. <tr class="memitem:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3">MQTTClient_subscribeMany</a> (MQTTClient handle, int count, char *const *topic, int *qos)</td></tr>
  265. <tr class="memdesc:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wildcard). <a href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3">More...</a><br /></td></tr>
  266. <tr class="separator:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  267. <tr class="memitem:af35ab7375435f7b6388c5ff4610dad3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d">MQTTClient_subscribe5</a> (MQTTClient handle, const char *topic, int qos, <a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *opts, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  268. <tr class="memdesc:af35ab7375435f7b6388c5ff4610dad3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain wildcards (see wildcard). <a href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d">More...</a><br /></td></tr>
  269. <tr class="separator:af35ab7375435f7b6388c5ff4610dad3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  270. <tr class="memitem:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3">MQTTClient_subscribe</a> (MQTTClient handle, const char *topic, int qos)</td></tr>
  271. <tr class="memdesc:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe a client to a single topic, which may contain wildcards (see wildcard). <a href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3">More...</a><br /></td></tr>
  272. <tr class="separator:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  273. <tr class="memitem:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5">MQTTClient_unsubscribeMany5</a> (MQTTClient handle, int count, char *const *topic, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  274. <tr class="memdesc:a46bdb532d2153110ccffb2f0748d1ba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove existing subscriptions to a list of topics made by the specified client using MQTT version 5.0. <a href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5">More...</a><br /></td></tr>
  275. <tr class="separator:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  276. <tr class="memitem:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a50abbce720d50b9f84b97ff9fa1f546d">MQTTClient_unsubscribeMany</a> (MQTTClient handle, int count, char *const *topic)</td></tr>
  277. <tr class="memdesc:a50abbce720d50b9f84b97ff9fa1f546d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove existing subscriptions to a list of topics made by the specified client. <a href="MQTTClient_8c.html#a50abbce720d50b9f84b97ff9fa1f546d">More...</a><br /></td></tr>
  278. <tr class="separator:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  279. <tr class="memitem:a58356c13867f18df60fd4c7ec9457c48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48">MQTTClient_unsubscribe5</a> (MQTTClient handle, const char *topic, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
  280. <tr class="memdesc:a58356c13867f18df60fd4c7ec9457c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove an existing subscription made by the specified client using MQTT 5.0. <a href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48">More...</a><br /></td></tr>
  281. <tr class="separator:a58356c13867f18df60fd4c7ec9457c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
  282. <tr class="memitem:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aa8731be3dbc6a25f41f037f8bbbb054b">MQTTClient_unsubscribe</a> (MQTTClient handle, const char *topic)</td></tr>
  283. <tr class="memdesc:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove an existing subscription made by the specified client. <a href="MQTTClient_8c.html#aa8731be3dbc6a25f41f037f8bbbb054b">More...</a><br /></td></tr>
  284. <tr class="separator:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  285. <tr class="memitem:a3c0ca97b393eee10d4f441ba68830e83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83">MQTTClient_publish5</a> (MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *properties, MQTTClient_deliveryToken *deliveryToken)</td></tr>
  286. <tr class="memdesc:a3c0ca97b393eee10d4f441ba68830e83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to publish a message to a given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5...">MQTTClient_publishMessage5()</a>). <a href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83">More...</a><br /></td></tr>
  287. <tr class="separator:a3c0ca97b393eee10d4f441ba68830e83"><td class="memSeparator" colspan="2">&#160;</td></tr>
  288. <tr class="memitem:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37">MQTTClient_publish</a> (MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, MQTTClient_deliveryToken *deliveryToken)</td></tr>
  289. <tr class="memdesc:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>). <a href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37">More...</a><br /></td></tr>
  290. <tr class="separator:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
  291. <tr class="memitem:ae54936bf7680dcde353e6fc785a44461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461">MQTTClient_publishMessage5</a> (MQTTClient handle, const char *topicName, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *message, MQTTClient_deliveryToken *deliveryToken)</td></tr>
  292. <tr class="memdesc:ae54936bf7680dcde353e6fc785a44461"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to publish a message to the given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes...">MQTTClient_publish5()</a>). <a href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461">More...</a><br /></td></tr>
  293. <tr class="separator:ae54936bf7680dcde353e6fc785a44461"><td class="memSeparator" colspan="2">&#160;</td></tr>
  294. <tr class="memitem:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3">MQTTClient_publishMessage</a> (MQTTClient handle, const char *topicName, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *message, MQTTClient_deliveryToken *deliveryToken)</td></tr>
  295. <tr class="memdesc:a5e0cfa14237d7557bee2a59747ecadd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a>). <a href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3">More...</a><br /></td></tr>
  296. <tr class="separator:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  297. <tr class="memitem:a4c2df88d00a3dadd510a8cb774739366"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366">MQTTClient_receive</a> (MQTTClient handle, char **topicName, int *topicLen, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message, unsigned long timeout)</td></tr>
  298. <tr class="memdesc:a4c2df88d00a3dadd510a8cb774739366"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs a synchronous receive of incoming messages. <a href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366">More...</a><br /></td></tr>
  299. <tr class="separator:a4c2df88d00a3dadd510a8cb774739366"><td class="memSeparator" colspan="2">&#160;</td></tr>
  300. <tr class="memitem:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield</a> (void)</td></tr>
  301. <tr class="memdesc:a8ad3d29864a9ca08202b0832e0f6678e"><td class="mdescLeft">&#160;</td><td class="mdescRight">When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings. <a href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e">More...</a><br /></td></tr>
  302. <tr class="separator:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  303. <tr class="memitem:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283">MQTTClient_waitForCompletion</a> (MQTTClient handle, MQTTClient_deliveryToken mdt, unsigned long timeout)</td></tr>
  304. <tr class="memdesc:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called by the client application to synchronize execution of the main thread with completed publication of a message. <a href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283">More...</a><br /></td></tr>
  305. <tr class="separator:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memSeparator" colspan="2">&#160;</td></tr>
  306. <tr class="memitem:a2a617c6b0492c04a4ddea592f5e53604"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens</a> (MQTTClient handle, MQTTClient_deliveryToken **tokens)</td></tr>
  307. <tr class="memdesc:a2a617c6b0492c04a4ddea592f5e53604"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion). <a href="MQTTClient_8c.html#a2a617c6b0492c04a4ddea592f5e53604">More...</a><br /></td></tr>
  308. <tr class="separator:a2a617c6b0492c04a4ddea592f5e53604"><td class="memSeparator" colspan="2">&#160;</td></tr>
  309. <tr class="memitem:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a4dfa35d29db54b10b15b8ac2d9a778be">MQTTClient_setTraceLevel</a> (enum MQTTCLIENT_TRACE_LEVELS level)</td></tr>
  310. <tr class="memdesc:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the level of trace information which will be returned in the trace callback. <a href="MQTTClient_8c.html#a4dfa35d29db54b10b15b8ac2d9a778be">More...</a><br /></td></tr>
  311. <tr class="separator:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memSeparator" colspan="2">&#160;</td></tr>
  312. <tr class="memitem:a22870f94aa4cb1827626612f1ded7c69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">MQTTClient_setTraceCallback</a> (MQTTClient_traceCallback *callback)</td></tr>
  313. <tr class="memdesc:a22870f94aa4cb1827626612f1ded7c69"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the trace callback if needed. <a href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">More...</a><br /></td></tr>
  314. <tr class="separator:a22870f94aa4cb1827626612f1ded7c69"><td class="memSeparator" colspan="2">&#160;</td></tr>
  315. <tr class="memitem:a96067a2fb74d2a61c7e93015629548e0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a96067a2fb74d2a61c7e93015629548e0">MQTTClient_setCommandTimeout</a> (MQTTClient handle, unsigned long milliSeconds)</td></tr>
  316. <tr class="memdesc:a96067a2fb74d2a61c7e93015629548e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout value for un/subscribe commands when waiting for the un/suback response from the server. <a href="MQTTClient_8c.html#a96067a2fb74d2a61c7e93015629548e0">More...</a><br /></td></tr>
  317. <tr class="separator:a96067a2fb74d2a61c7e93015629548e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  318. <tr class="memitem:abe842456c914ce9201d277a972cc085e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">MQTTClient_getVersionInfo</a> (void)</td></tr>
  319. <tr class="memdesc:abe842456c914ce9201d277a972cc085e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns version information about the library. <a href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">More...</a><br /></td></tr>
  320. <tr class="separator:abe842456c914ce9201d277a972cc085e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  321. <tr class="memitem:a9defda2979f6fedaae64fd85f5c2f617"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9defda2979f6fedaae64fd85f5c2f617">MQTTClient_strerror</a> (int code)</td></tr>
  322. <tr class="memdesc:a9defda2979f6fedaae64fd85f5c2f617"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the string representation of the error or NULL. <a href="MQTTClient_8c.html#a9defda2979f6fedaae64fd85f5c2f617">More...</a><br /></td></tr>
  323. <tr class="separator:a9defda2979f6fedaae64fd85f5c2f617"><td class="memSeparator" colspan="2">&#160;</td></tr>
  324. </table><table class="memberdecls">
  325. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  326. Variables</h2></td></tr>
  327. <tr class="memitem:a002f05835324a6cbd270ff94de6be02e"><td class="memItemLeft" align="right" valign="top"><a id="a002f05835324a6cbd270ff94de6be02e"></a>
  328. const char *&#160;</td><td class="memItemRight" valign="bottom"><b>client_timestamp_eye</b> = &quot;MQTTClientV3_Timestamp &quot; BUILD_TIMESTAMP</td></tr>
  329. <tr class="separator:a002f05835324a6cbd270ff94de6be02e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  330. <tr class="memitem:a9e5c55b41667da1b47178c4a0997628c"><td class="memItemLeft" align="right" valign="top"><a id="a9e5c55b41667da1b47178c4a0997628c"></a>
  331. const char *&#160;</td><td class="memItemRight" valign="bottom"><b>client_version_eye</b> = &quot;MQTTClientV3_Version &quot; CLIENT_VERSION</td></tr>
  332. <tr class="separator:a9e5c55b41667da1b47178c4a0997628c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  333. <tr class="memitem:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structClientStates.html">ClientStates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ClientState</b></td></tr>
  334. <tr class="separator:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  335. <tr class="memitem:a2f44b42678b96ba591f6042671e3ba6b"><td class="memItemLeft" align="right" valign="top"><a id="a2f44b42678b96ba591f6042671e3ba6b"></a>
  336. <a class="el" href="structClientStates.html">ClientStates</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>bstate</b> = &amp;ClientState</td></tr>
  337. <tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  338. <tr class="memitem:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memItemLeft" align="right" valign="top"><a id="a2dc95966878cf339e99ab7f7d1f7cc82"></a>
  339. <a class="el" href="structMQTTProtocol.html">MQTTProtocol</a>&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
  340. <tr class="separator:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  341. <tr class="memitem:a238cb4b93c0ffe869accf47116a3e022"><td class="memItemLeft" align="right" valign="top"><a id="a238cb4b93c0ffe869accf47116a3e022"></a>
  342. static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
  343. <tr class="separator:a238cb4b93c0ffe869accf47116a3e022"><td class="memSeparator" colspan="2">&#160;</td></tr>
  344. <tr class="memitem:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memItemLeft" align="right" valign="top"><a id="a34d74bdafe1f165a7c7b3f204212b1dd"></a>
  345. static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex</b> = &amp;mqttclient_mutex_store</td></tr>
  346. <tr class="separator:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  347. <tr class="memitem:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memItemLeft" align="right" valign="top"><a id="a53ea93ecc4a4eef4286f0dfd4be5aafb"></a>
  348. static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>socket_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
  349. <tr class="separator:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  350. <tr class="memitem:a2e21c80906915bcadf7b0937235a3416"><td class="memItemLeft" align="right" valign="top"><a id="a2e21c80906915bcadf7b0937235a3416"></a>
  351. static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>socket_mutex</b> = &amp;socket_mutex_store</td></tr>
  352. <tr class="separator:a2e21c80906915bcadf7b0937235a3416"><td class="memSeparator" colspan="2">&#160;</td></tr>
  353. <tr class="memitem:a39d35b6edc70eb0a0878527187188a5d"><td class="memItemLeft" align="right" valign="top"><a id="a39d35b6edc70eb0a0878527187188a5d"></a>
  354. static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>subscribe_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
  355. <tr class="separator:a39d35b6edc70eb0a0878527187188a5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  356. <tr class="memitem:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memItemLeft" align="right" valign="top"><a id="a57d1d41fc77b4fd3b35d92998e3caf88"></a>
  357. static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>subscribe_mutex</b> = &amp;subscribe_mutex_store</td></tr>
  358. <tr class="separator:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memSeparator" colspan="2">&#160;</td></tr>
  359. <tr class="memitem:ae6d26b53a93f99eeca00177df5ba519b"><td class="memItemLeft" align="right" valign="top"><a id="ae6d26b53a93f99eeca00177df5ba519b"></a>
  360. static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>unsubscribe_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
  361. <tr class="separator:ae6d26b53a93f99eeca00177df5ba519b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  362. <tr class="memitem:aa6c836b583d21bb5d1950e4654070a5d"><td class="memItemLeft" align="right" valign="top"><a id="aa6c836b583d21bb5d1950e4654070a5d"></a>
  363. static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>unsubscribe_mutex</b> = &amp;unsubscribe_mutex_store</td></tr>
  364. <tr class="separator:aa6c836b583d21bb5d1950e4654070a5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  365. <tr class="memitem:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memItemLeft" align="right" valign="top"><a id="a04d2f8260515229acdcc8c6c378bd6f1"></a>
  366. static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>connect_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
  367. <tr class="separator:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  368. <tr class="memitem:aecac74d6e790ccf5af3918553b040bde"><td class="memItemLeft" align="right" valign="top"><a id="aecac74d6e790ccf5af3918553b040bde"></a>
  369. static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>connect_mutex</b> = &amp;connect_mutex_store</td></tr>
  370. <tr class="separator:aecac74d6e790ccf5af3918553b040bde"><td class="memSeparator" colspan="2">&#160;</td></tr>
  371. <tr class="memitem:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memItemLeft" align="right" valign="top"><a id="a733a136a6ae351b9c145b3fc5af04aa0"></a>
  372. static volatile int&#160;</td><td class="memItemRight" valign="bottom"><b>library_initialized</b> = 0</td></tr>
  373. <tr class="separator:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  374. <tr class="memitem:a96317981ac7f003130a55ffda157c4c1"><td class="memItemLeft" align="right" valign="top"><a id="a96317981ac7f003130a55ffda157c4c1"></a>
  375. static <a class="el" href="structList.html">List</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>handles</b> = NULL</td></tr>
  376. <tr class="separator:a96317981ac7f003130a55ffda157c4c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  377. <tr class="memitem:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memItemLeft" align="right" valign="top"><a id="a2f45113638a0b749a8a205d2cd7fb42b"></a>
  378. static int&#160;</td><td class="memItemRight" valign="bottom"><b>running</b> = 0</td></tr>
  379. <tr class="separator:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  380. <tr class="memitem:a347200bb2e843926f1be8fb43de273b3"><td class="memItemLeft" align="right" valign="top"><a id="a347200bb2e843926f1be8fb43de273b3"></a>
  381. static int&#160;</td><td class="memItemRight" valign="bottom"><b>tostop</b> = 0</td></tr>
  382. <tr class="separator:a347200bb2e843926f1be8fb43de273b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  383. <tr class="memitem:aa5badf3940b33aca748205668c626668"><td class="memItemLeft" align="right" valign="top"><a id="aa5badf3940b33aca748205668c626668"></a>
  384. static thread_id_type&#160;</td><td class="memItemRight" valign="bottom"><b>run_id</b> = 0</td></tr>
  385. <tr class="separator:aa5badf3940b33aca748205668c626668"><td class="memSeparator" colspan="2">&#160;</td></tr>
  386. <tr class="memitem:a25522fe2dcb57f8f4338355b6b89b671"><td class="memItemLeft" align="right" valign="top"><a id="a25522fe2dcb57f8f4338355b6b89b671"></a>
  387. static int&#160;</td><td class="memItemRight" valign="bottom"><b>retryLoopIntervalms</b> = 5000</td></tr>
  388. <tr class="separator:a25522fe2dcb57f8f4338355b6b89b671"><td class="memSeparator" colspan="2">&#160;</td></tr>
  389. </table>
  390. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  391. <div class="textblock"><p>Synchronous API implementation. </p>
  392. </div><h2 class="groupheader">Function Documentation</h2>
  393. <a id="adbcf69dbaf0a0dcbcc87d23f99e73fca"></a>
  394. <h2 class="memtitle"><span class="permalink"><a href="#adbcf69dbaf0a0dcbcc87d23f99e73fca">&#9670;&nbsp;</a></span>call_disconnected()</h2>
  395. <div class="memitem">
  396. <div class="memproto">
  397. <table class="mlabels">
  398. <tr>
  399. <td class="mlabels-left">
  400. <table class="memname">
  401. <tr>
  402. <td class="memname">static thread_return_type WINAPI call_disconnected </td>
  403. <td>(</td>
  404. <td class="paramtype">void *&#160;</td>
  405. <td class="paramname"><em>context</em></td><td>)</td>
  406. <td></td>
  407. </tr>
  408. </table>
  409. </td>
  410. <td class="mlabels-right">
  411. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  412. </tr>
  413. </table>
  414. </div><div class="memdoc">
  415. <p>Wrapper function to call disconnected on a separate thread. </p>
  416. <p>A separate thread is needed to allow the disconnected function to make API calls (e.g. connect) </p><dl class="params"><dt>Parameters</dt><dd>
  417. <table class="params">
  418. <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
  419. </table>
  420. </dd>
  421. </dl>
  422. <dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>
  423. </div>
  424. </div>
  425. <a id="ac35494adea1f11d3480b50b8a7f0c17d"></a>
  426. <h2 class="memtitle"><span class="permalink"><a href="#ac35494adea1f11d3480b50b8a7f0c17d">&#9670;&nbsp;</a></span>clientSockCompare()</h2>
  427. <div class="memitem">
  428. <div class="memproto">
  429. <table class="mlabels">
  430. <tr>
  431. <td class="mlabels-left">
  432. <table class="memname">
  433. <tr>
  434. <td class="memname">static int clientSockCompare </td>
  435. <td>(</td>
  436. <td class="paramtype">void *&#160;</td>
  437. <td class="paramname"><em>a</em>, </td>
  438. </tr>
  439. <tr>
  440. <td class="paramkey"></td>
  441. <td></td>
  442. <td class="paramtype">void *&#160;</td>
  443. <td class="paramname"><em>b</em>&#160;</td>
  444. </tr>
  445. <tr>
  446. <td></td>
  447. <td>)</td>
  448. <td></td><td></td>
  449. </tr>
  450. </table>
  451. </td>
  452. <td class="mlabels-right">
  453. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  454. </tr>
  455. </table>
  456. </div><div class="memdoc">
  457. <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing clients by socket. </p>
  458. <dl class="params"><dt>Parameters</dt><dd>
  459. <table class="params">
  460. <tr><td class="paramname">a</td><td>first integer value </td></tr>
  461. <tr><td class="paramname">b</td><td>second integer value </td></tr>
  462. </table>
  463. </dd>
  464. </dl>
  465. <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
  466. </div>
  467. </div>
  468. <a id="a0c0d8194bf8a449928881cf83276728e"></a>
  469. <h2 class="memtitle"><span class="permalink"><a href="#a0c0d8194bf8a449928881cf83276728e">&#9670;&nbsp;</a></span>connectionLost_call()</h2>
  470. <div class="memitem">
  471. <div class="memproto">
  472. <table class="mlabels">
  473. <tr>
  474. <td class="mlabels-left">
  475. <table class="memname">
  476. <tr>
  477. <td class="memname">static thread_return_type WINAPI connectionLost_call </td>
  478. <td>(</td>
  479. <td class="paramtype">void *&#160;</td>
  480. <td class="paramname"><em>context</em></td><td>)</td>
  481. <td></td>
  482. </tr>
  483. </table>
  484. </td>
  485. <td class="mlabels-right">
  486. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  487. </tr>
  488. </table>
  489. </div><div class="memdoc">
  490. <p>Wrapper function to call connection lost on a separate thread. </p>
  491. <p>A separate thread is needed to allow the connectionLost function to make API calls (e.g. connect) </p><dl class="params"><dt>Parameters</dt><dd>
  492. <table class="params">
  493. <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
  494. </table>
  495. </dd>
  496. </dl>
  497. <dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>
  498. </div>
  499. </div>
  500. <a id="aaa8ae61cd65c9dc0846df10122d7bd4e"></a>
  501. <h2 class="memtitle"><span class="permalink"><a href="#aaa8ae61cd65c9dc0846df10122d7bd4e">&#9670;&nbsp;</a></span>MQTTClient_connect()</h2>
  502. <div class="memitem">
  503. <div class="memproto">
  504. <table class="memname">
  505. <tr>
  506. <td class="memname">int MQTTClient_connect </td>
  507. <td>(</td>
  508. <td class="paramtype">MQTTClient&#160;</td>
  509. <td class="paramname"><em>handle</em>, </td>
  510. </tr>
  511. <tr>
  512. <td class="paramkey"></td>
  513. <td></td>
  514. <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *&#160;</td>
  515. <td class="paramname"><em>options</em>&#160;</td>
  516. </tr>
  517. <tr>
  518. <td></td>
  519. <td>)</td>
  520. <td></td><td></td>
  521. </tr>
  522. </table>
  523. </div><div class="memdoc">
  524. <p>This function attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using the specified options. </p>
  525. <p>If you want to enable asynchronous message and status notifications, you must call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> prior to <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  526. <table class="params">
  527. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  528. <tr><td class="paramname">options</td><td>A pointer to a valid <a class="el" href="structMQTTClient__connectOptions.html" title="MQTTClient_connectOptions defines several settings that control the way the client connects to an MQT...">MQTTClient_connectOptions</a> structure. </td></tr>
  529. </table>
  530. </dd>
  531. </dl>
  532. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client successfully connects to the server. An error code is returned if the client was unable to connect to the server. Error codes greater than 0 are returned by the MQTT protocol:<br />
  533. <br />
  534. <b>1</b>: Connection refused: Unacceptable protocol version<br />
  535. <b>2</b>: Connection refused: Identifier rejected<br />
  536. <b>3</b>: Connection refused: Server unavailable<br />
  537. <b>4</b>: Connection refused: Bad user name or password<br />
  538. <b>5</b>: Connection refused: Not authorized<br />
  539. <b>6-255</b>: Reserved for future use<br />
  540. </dd></dl>
  541. </div>
  542. </div>
  543. <a id="aa777f80cb3eec5610f976aff30b8c0d6"></a>
  544. <h2 class="memtitle"><span class="permalink"><a href="#aa777f80cb3eec5610f976aff30b8c0d6">&#9670;&nbsp;</a></span>MQTTClient_connect5()</h2>
  545. <div class="memitem">
  546. <div class="memproto">
  547. <table class="memname">
  548. <tr>
  549. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_connect5 </td>
  550. <td>(</td>
  551. <td class="paramtype">MQTTClient&#160;</td>
  552. <td class="paramname"><em>handle</em>, </td>
  553. </tr>
  554. <tr>
  555. <td class="paramkey"></td>
  556. <td></td>
  557. <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *&#160;</td>
  558. <td class="paramname"><em>options</em>, </td>
  559. </tr>
  560. <tr>
  561. <td class="paramkey"></td>
  562. <td></td>
  563. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  564. <td class="paramname"><em>connectProperties</em>, </td>
  565. </tr>
  566. <tr>
  567. <td class="paramkey"></td>
  568. <td></td>
  569. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  570. <td class="paramname"><em>willProperties</em>&#160;</td>
  571. </tr>
  572. <tr>
  573. <td></td>
  574. <td>)</td>
  575. <td></td><td></td>
  576. </tr>
  577. </table>
  578. </div><div class="memdoc">
  579. <p>Attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using MQTT version 5.0 and the specified options. </p>
  580. <p>If you want to enable asynchronous message and status notifications, you must call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> prior to <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  581. <table class="params">
  582. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  583. <tr><td class="paramname">options</td><td>A pointer to a valid <a class="el" href="structMQTTClient__connectOptions.html" title="MQTTClient_connectOptions defines several settings that control the way the client connects to an MQT...">MQTTClient_connectOptions</a> structure. </td></tr>
  584. <tr><td class="paramname">connectProperties</td><td>the MQTT 5.0 connect properties to use </td></tr>
  585. <tr><td class="paramname">willProperties</td><td>the MQTT 5.0 properties to set on the will message </td></tr>
  586. </table>
  587. </dd>
  588. </dl>
  589. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  590. </div>
  591. </div>
  592. <a id="a9a0518d9ca924d12c1329dbe3de5f2b6"></a>
  593. <h2 class="memtitle"><span class="permalink"><a href="#a9a0518d9ca924d12c1329dbe3de5f2b6">&#9670;&nbsp;</a></span>MQTTClient_create()</h2>
  594. <div class="memitem">
  595. <div class="memproto">
  596. <table class="memname">
  597. <tr>
  598. <td class="memname">int MQTTClient_create </td>
  599. <td>(</td>
  600. <td class="paramtype">MQTTClient *&#160;</td>
  601. <td class="paramname"><em>handle</em>, </td>
  602. </tr>
  603. <tr>
  604. <td class="paramkey"></td>
  605. <td></td>
  606. <td class="paramtype">const char *&#160;</td>
  607. <td class="paramname"><em>serverURI</em>, </td>
  608. </tr>
  609. <tr>
  610. <td class="paramkey"></td>
  611. <td></td>
  612. <td class="paramtype">const char *&#160;</td>
  613. <td class="paramname"><em>clientId</em>, </td>
  614. </tr>
  615. <tr>
  616. <td class="paramkey"></td>
  617. <td></td>
  618. <td class="paramtype">int&#160;</td>
  619. <td class="paramname"><em>persistence_type</em>, </td>
  620. </tr>
  621. <tr>
  622. <td class="paramkey"></td>
  623. <td></td>
  624. <td class="paramtype">void *&#160;</td>
  625. <td class="paramname"><em>persistence_context</em>&#160;</td>
  626. </tr>
  627. <tr>
  628. <td></td>
  629. <td>)</td>
  630. <td></td><td></td>
  631. </tr>
  632. </table>
  633. </div><div class="memdoc">
  634. <p>This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>). </p>
  635. <p>See also <a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create()).">MQTTClient_destroy()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  636. <table class="params">
  637. <tr><td class="paramname">handle</td><td>A pointer to an ::MQTTClient handle. The handle is populated with a valid client reference following a successful return from this function. </td></tr>
  638. <tr><td class="paramname">serverURI</td><td>A null-terminated string specifying the server to which the client will connect. It takes the form <em>protocol://host:port</em>. Currently, <em>protocol</em> must be: <br />
  639. <em>tcp://</em> or <em>mqtt://</em> - Insecure TCP <br />
  640. <em>ssl://</em> or <em>mqtts://</em> - Encrypted SSL/TLS <br />
  641. <em>ws://</em> - Insecure websockets <br />
  642. <em>wss://</em> - Secure web sockets <br />
  643. The TLS enabled prefixes (ssl, mqtts, wss) are only valid if a TLS version of the library is linked with. For <em>host</em>, you can specify either an IP address or a host name. For instance, to connect to a server running on the local machines with the default MQTT port, specify <em>tcp://localhost:1883</em>. </td></tr>
  644. <tr><td class="paramname">clientId</td><td>The client identifier passed to the server when the client connects to it. It is a null-terminated UTF-8 encoded string. </td></tr>
  645. <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br />
  646. <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a>: Use in-memory persistence. If the device or system on which the client is running fails or is switched off, the current state of any in-flight messages is lost and some messages may not be delivered even at QoS1 and QoS2. <br />
  647. <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a>: Use the default (file system-based) persistence mechanism. Status about in-flight messages is held in persistent storage and provides some protection against message loss in the case of unexpected failure. <br />
  648. <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a>: Use an application-specific persistence implementation. Using this type of persistence gives control of the persistence mechanism to the application. The application has to implement the <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> interface. </td></tr>
  649. <tr><td class="paramname">persistence_context</td><td>If the application uses <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a> persistence, this argument is unused and should be set to NULL. For <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a> persistence, it should be set to the location of the persistence directory (if set to NULL, the persistence directory used is the working directory). Applications that use <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a> persistence set this argument to point to a valid <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> structure. </td></tr>
  650. </table>
  651. </dd>
  652. </dl>
  653. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
  654. <div class="dynheader">
  655. Here is the call graph for this function:</div>
  656. <div class="dyncontent">
  657. <div class="center"><img src="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph.png" border="0" usemap="#MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" alt=""/></div>
  658. <map name="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" id="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph">
  659. <area shape="rect" title="This function creates an MQTT client ready for connection to the specified server and using the speci..." alt="" coords="5,5,140,32"/>
  660. <area shape="rect" href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661" title="A version of :MQTTClient_create() with additional options." alt="" coords="188,5,395,32"/>
  661. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="443,5,577,32"/>
  662. </map>
  663. </div>
  664. </div>
  665. </div>
  666. <a id="ade24f717a9b39d38b081e1d5e0db1661"></a>
  667. <h2 class="memtitle"><span class="permalink"><a href="#ade24f717a9b39d38b081e1d5e0db1661">&#9670;&nbsp;</a></span>MQTTClient_createWithOptions()</h2>
  668. <div class="memitem">
  669. <div class="memproto">
  670. <table class="memname">
  671. <tr>
  672. <td class="memname">int MQTTClient_createWithOptions </td>
  673. <td>(</td>
  674. <td class="paramtype">MQTTClient *&#160;</td>
  675. <td class="paramname"><em>handle</em>, </td>
  676. </tr>
  677. <tr>
  678. <td class="paramkey"></td>
  679. <td></td>
  680. <td class="paramtype">const char *&#160;</td>
  681. <td class="paramname"><em>serverURI</em>, </td>
  682. </tr>
  683. <tr>
  684. <td class="paramkey"></td>
  685. <td></td>
  686. <td class="paramtype">const char *&#160;</td>
  687. <td class="paramname"><em>clientId</em>, </td>
  688. </tr>
  689. <tr>
  690. <td class="paramkey"></td>
  691. <td></td>
  692. <td class="paramtype">int&#160;</td>
  693. <td class="paramname"><em>persistence_type</em>, </td>
  694. </tr>
  695. <tr>
  696. <td class="paramkey"></td>
  697. <td></td>
  698. <td class="paramtype">void *&#160;</td>
  699. <td class="paramname"><em>persistence_context</em>, </td>
  700. </tr>
  701. <tr>
  702. <td class="paramkey"></td>
  703. <td></td>
  704. <td class="paramtype"><a class="el" href="structMQTTClient__createOptions.html">MQTTClient_createOptions</a> *&#160;</td>
  705. <td class="paramname"><em>options</em>&#160;</td>
  706. </tr>
  707. <tr>
  708. <td></td>
  709. <td>)</td>
  710. <td></td><td></td>
  711. </tr>
  712. </table>
  713. </div><div class="memdoc">
  714. <p>A version of :<a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a> with additional options. </p>
  715. <p>This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>). See also <a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create()).">MQTTClient_destroy()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  716. <table class="params">
  717. <tr><td class="paramname">handle</td><td>A pointer to an ::MQTTClient handle. The handle is populated with a valid client reference following a successful return from this function. </td></tr>
  718. <tr><td class="paramname">serverURI</td><td>A null-terminated string specifying the server to which the client will connect. It takes the form <em>protocol://host:port</em>. Currently, <em>protocol</em> must be <em>tcp</em> or <em>ssl</em>. For <em>host</em>, you can specify either an IP address or a host name. For instance, to connect to a server running on the local machines with the default MQTT port, specify <em>tcp://localhost:1883</em>. </td></tr>
  719. <tr><td class="paramname">clientId</td><td>The client identifier passed to the server when the client connects to it. It is a null-terminated UTF-8 encoded string. </td></tr>
  720. <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br />
  721. <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a>: Use in-memory persistence. If the device or system on which the client is running fails or is switched off, the current state of any in-flight messages is lost and some messages may not be delivered even at QoS1 and QoS2. <br />
  722. <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a>: Use the default (file system-based) persistence mechanism. Status about in-flight messages is held in persistent storage and provides some protection against message loss in the case of unexpected failure. <br />
  723. <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a>: Use an application-specific persistence implementation. Using this type of persistence gives control of the persistence mechanism to the application. The application has to implement the <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> interface. </td></tr>
  724. <tr><td class="paramname">persistence_context</td><td>If the application uses <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a> persistence, this argument is unused and should be set to NULL. For <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a> persistence, it should be set to the location of the persistence directory (if set to NULL, the persistence directory used is the working directory). Applications that use <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a> persistence set this argument to point to a valid <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> structure. </td></tr>
  725. <tr><td class="paramname">options</td><td>additional options for the create. </td></tr>
  726. </table>
  727. </dd>
  728. </dl>
  729. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
  730. <div class="dynheader">
  731. Here is the call graph for this function:</div>
  732. <div class="dyncontent">
  733. <div class="center"><img src="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph.png" border="0" usemap="#MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" alt=""/></div>
  734. <map name="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" id="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph">
  735. <area shape="rect" title="A version of :MQTTClient_create() with additional options." alt="" coords="5,5,212,32"/>
  736. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
  737. </map>
  738. </div>
  739. </div>
  740. </div>
  741. <a id="ae700c3f5cfea3813264ce95e7c8cf498"></a>
  742. <h2 class="memtitle"><span class="permalink"><a href="#ae700c3f5cfea3813264ce95e7c8cf498">&#9670;&nbsp;</a></span>MQTTClient_destroy()</h2>
  743. <div class="memitem">
  744. <div class="memproto">
  745. <table class="memname">
  746. <tr>
  747. <td class="memname">void MQTTClient_destroy </td>
  748. <td>(</td>
  749. <td class="paramtype">MQTTClient *&#160;</td>
  750. <td class="paramname"><em>handle</em></td><td>)</td>
  751. <td></td>
  752. </tr>
  753. </table>
  754. </div><div class="memdoc">
  755. <p>This function frees the memory allocated to an MQTT client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>). </p>
  756. <p>It should be called when the client is no longer required. </p><dl class="params"><dt>Parameters</dt><dd>
  757. <table class="params">
  758. <tr><td class="paramname">handle</td><td>A pointer to the handle referring to the ::MQTTClient structure to be freed. </td></tr>
  759. </table>
  760. </dd>
  761. </dl>
  762. <div class="dynheader">
  763. Here is the call graph for this function:</div>
  764. <div class="dyncontent">
  765. <div class="center"><img src="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph.png" border="0" usemap="#MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" alt=""/></div>
  766. <map name="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" id="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph">
  767. <area shape="rect" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create())." alt="" coords="5,5,147,32"/>
  768. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="195,5,329,32"/>
  769. </map>
  770. </div>
  771. </div>
  772. </div>
  773. <a id="a1e4d90c13a3c0705bc4a13bfe64e6525"></a>
  774. <h2 class="memtitle"><span class="permalink"><a href="#a1e4d90c13a3c0705bc4a13bfe64e6525">&#9670;&nbsp;</a></span>MQTTClient_disconnect()</h2>
  775. <div class="memitem">
  776. <div class="memproto">
  777. <table class="memname">
  778. <tr>
  779. <td class="memname">int MQTTClient_disconnect </td>
  780. <td>(</td>
  781. <td class="paramtype">MQTTClient&#160;</td>
  782. <td class="paramname"><em>handle</em>, </td>
  783. </tr>
  784. <tr>
  785. <td class="paramkey"></td>
  786. <td></td>
  787. <td class="paramtype">int&#160;</td>
  788. <td class="paramname"><em>timeout</em>&#160;</td>
  789. </tr>
  790. <tr>
  791. <td></td>
  792. <td>)</td>
  793. <td></td><td></td>
  794. </tr>
  795. </table>
  796. </div><div class="memdoc">
  797. <p>This function attempts to disconnect the client from the MQTT server. </p>
  798. <p>In order to allow the client time to complete handling of messages that are in-flight when this function is called, a timeout period is specified. When the timeout period has expired, the client disconnects even if there are still outstanding message acknowledgements. The next time the client connects to the same server, any QoS 1 or 2 messages which have not completed will be retried depending on the cleansession settings for both the previous and the new connection (see <a class="el" href="structMQTTClient__connectOptions.html#a03a2cfaf17483f1b0aab2a70f3ef30d9" title="This is a boolean value.">MQTTClient_connectOptions.cleansession</a> and <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  799. <table class="params">
  800. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  801. <tr><td class="paramname">timeout</td><td>The client delays disconnection for up to this time (in milliseconds) in order to allow in-flight message transfers to complete. </td></tr>
  802. </table>
  803. </dd>
  804. </dl>
  805. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client successfully disconnects from the server. An error code is returned if the client was unable to disconnect from the server </dd></dl>
  806. <div class="dynheader">
  807. Here is the call graph for this function:</div>
  808. <div class="dyncontent">
  809. <div class="center"><img src="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph.png" border="0" usemap="#MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" alt=""/></div>
  810. <map name="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" id="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph">
  811. <area shape="rect" title="This function attempts to disconnect the client from the MQTT server." alt="" coords="5,5,168,32"/>
  812. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="216,5,351,32"/>
  813. </map>
  814. </div>
  815. </div>
  816. </div>
  817. <a id="ab217acbfaf47603355ca430983f93095"></a>
  818. <h2 class="memtitle"><span class="permalink"><a href="#ab217acbfaf47603355ca430983f93095">&#9670;&nbsp;</a></span>MQTTClient_free()</h2>
  819. <div class="memitem">
  820. <div class="memproto">
  821. <table class="memname">
  822. <tr>
  823. <td class="memname">void MQTTClient_free </td>
  824. <td>(</td>
  825. <td class="paramtype">void *&#160;</td>
  826. <td class="paramname"><em>ptr</em></td><td>)</td>
  827. <td></td>
  828. </tr>
  829. </table>
  830. </div><div class="memdoc">
  831. <p>This function frees memory allocated by the MQTT C client library, especially the topic name. </p>
  832. <p>This is needed on Windows when the client libary and application program have been compiled with different versions of the C compiler. It is thus good policy to always use this function when freeing any MQTT C client- allocated memory. </p><dl class="params"><dt>Parameters</dt><dd>
  833. <table class="params">
  834. <tr><td class="paramname">ptr</td><td>The pointer to the client library storage to be freed. </td></tr>
  835. </table>
  836. </dd>
  837. </dl>
  838. </div>
  839. </div>
  840. <a id="a2bc00ce11e0cac5dbc0938c512b4ab31"></a>
  841. <h2 class="memtitle"><span class="permalink"><a href="#a2bc00ce11e0cac5dbc0938c512b4ab31">&#9670;&nbsp;</a></span>MQTTClient_freeMessage()</h2>
  842. <div class="memitem">
  843. <div class="memproto">
  844. <table class="memname">
  845. <tr>
  846. <td class="memname">void MQTTClient_freeMessage </td>
  847. <td>(</td>
  848. <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **&#160;</td>
  849. <td class="paramname"><em>msg</em></td><td>)</td>
  850. <td></td>
  851. </tr>
  852. </table>
  853. </div><div class="memdoc">
  854. <p>This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload. </p>
  855. <p>The client application calls this function when the message has been fully processed. <b>Important note:</b> This function does not free the memory allocated to a message topic string. It is the responsibility of the client application to free this memory using the <a class="el" href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095" title="This function frees memory allocated by the MQTT C client library, especially the topic name.">MQTTClient_free()</a> library function. </p><dl class="params"><dt>Parameters</dt><dd>
  856. <table class="params">
  857. <tr><td class="paramname">msg</td><td>The address of a pointer to the <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure to be freed. </td></tr>
  858. </table>
  859. </dd>
  860. </dl>
  861. </div>
  862. </div>
  863. <a id="a2a617c6b0492c04a4ddea592f5e53604"></a>
  864. <h2 class="memtitle"><span class="permalink"><a href="#a2a617c6b0492c04a4ddea592f5e53604">&#9670;&nbsp;</a></span>MQTTClient_getPendingDeliveryTokens()</h2>
  865. <div class="memitem">
  866. <div class="memproto">
  867. <table class="memname">
  868. <tr>
  869. <td class="memname">int MQTTClient_getPendingDeliveryTokens </td>
  870. <td>(</td>
  871. <td class="paramtype">MQTTClient&#160;</td>
  872. <td class="paramname"><em>handle</em>, </td>
  873. </tr>
  874. <tr>
  875. <td class="paramkey"></td>
  876. <td></td>
  877. <td class="paramtype">MQTTClient_deliveryToken **&#160;</td>
  878. <td class="paramname"><em>tokens</em>&#160;</td>
  879. </tr>
  880. <tr>
  881. <td></td>
  882. <td>)</td>
  883. <td></td><td></td>
  884. </tr>
  885. </table>
  886. </div><div class="memdoc">
  887. <p>This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion). </p>
  888. <p><b>Important note:</b> The memory used to hold the array of tokens is malloc()'d in this function. The client application is responsible for freeing this memory when it is no longer required. </p><dl class="params"><dt>Parameters</dt><dd>
  889. <table class="params">
  890. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  891. <tr><td class="paramname">tokens</td><td>The address of a pointer to an ::MQTTClient_deliveryToken. When the function returns successfully, the pointer is set to point to an array of tokens representing messages pending completion. The last member of the array is set to -1 to indicate there are no more tokens. If no tokens are pending, the pointer is set to NULL. </td></tr>
  892. </table>
  893. </dd>
  894. </dl>
  895. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the function returns successfully. An error code is returned if there was a problem obtaining the list of pending tokens. </dd></dl>
  896. <div class="dynheader">
  897. Here is the call graph for this function:</div>
  898. <div class="dyncontent">
  899. <div class="center"><img src="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph.png" border="0" usemap="#MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" alt=""/></div>
  900. <map name="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" id="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph">
  901. <area shape="rect" title="This function sets a pointer to an array of delivery tokens for messages that are currently in&#45;flight..." alt="" coords="5,5,216,47"/>
  902. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="264,13,399,39"/>
  903. </map>
  904. </div>
  905. </div>
  906. </div>
  907. <a id="abe842456c914ce9201d277a972cc085e"></a>
  908. <h2 class="memtitle"><span class="permalink"><a href="#abe842456c914ce9201d277a972cc085e">&#9670;&nbsp;</a></span>MQTTClient_getVersionInfo()</h2>
  909. <div class="memitem">
  910. <div class="memproto">
  911. <table class="memname">
  912. <tr>
  913. <td class="memname"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a>* MQTTClient_getVersionInfo </td>
  914. <td>(</td>
  915. <td class="paramtype">void&#160;</td>
  916. <td class="paramname"></td><td>)</td>
  917. <td></td>
  918. </tr>
  919. </table>
  920. </div><div class="memdoc">
  921. <p>This function returns version information about the library. </p>
  922. <p>no trace information will be returned. </p><dl class="section return"><dt>Returns</dt><dd>an array of strings describing the library. The last entry is a NULL pointer. </dd></dl>
  923. </div>
  924. </div>
  925. <a id="a21804ede1a506d1d69a472bc30acc8ba"></a>
  926. <h2 class="memtitle"><span class="permalink"><a href="#a21804ede1a506d1d69a472bc30acc8ba">&#9670;&nbsp;</a></span>MQTTClient_global_init()</h2>
  927. <div class="memitem">
  928. <div class="memproto">
  929. <table class="memname">
  930. <tr>
  931. <td class="memname">void MQTTClient_global_init </td>
  932. <td>(</td>
  933. <td class="paramtype"><a class="el" href="structMQTTClient__init__options.html">MQTTClient_init_options</a> *&#160;</td>
  934. <td class="paramname"><em>inits</em></td><td>)</td>
  935. <td></td>
  936. </tr>
  937. </table>
  938. </div><div class="memdoc">
  939. <p>Global init of mqtt library. </p>
  940. <p>Call once on program start to set global behaviour. do_openssl_init - if mqtt library should initialize OpenSSL (1) or rely on the caller to do it before using the library (0) </p>
  941. </div>
  942. </div>
  943. <a id="a6e8231e8c47f6f67f7ebbb5dcb4c69c0"></a>
  944. <h2 class="memtitle"><span class="permalink"><a href="#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">&#9670;&nbsp;</a></span>MQTTClient_isConnected()</h2>
  945. <div class="memitem">
  946. <div class="memproto">
  947. <table class="memname">
  948. <tr>
  949. <td class="memname">int MQTTClient_isConnected </td>
  950. <td>(</td>
  951. <td class="paramtype">MQTTClient&#160;</td>
  952. <td class="paramname"><em>handle</em></td><td>)</td>
  953. <td></td>
  954. </tr>
  955. </table>
  956. </div><div class="memdoc">
  957. <p>This function allows the client application to test whether or not a client is currently connected to the MQTT server. </p>
  958. <dl class="params"><dt>Parameters</dt><dd>
  959. <table class="params">
  960. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  961. </table>
  962. </dd>
  963. </dl>
  964. <dl class="section return"><dt>Returns</dt><dd>Boolean true if the client is connected, otherwise false. </dd></dl>
  965. <div class="dynheader">
  966. Here is the call graph for this function:</div>
  967. <div class="dyncontent">
  968. <div class="center"><img src="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph.png" border="0" usemap="#MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" alt=""/></div>
  969. <map name="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" id="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph">
  970. <area shape="rect" title="This function allows the client application to test whether or not a client is currently connected to..." alt="" coords="5,5,176,32"/>
  971. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="224,5,359,32"/>
  972. </map>
  973. </div>
  974. </div>
  975. </div>
  976. <a id="a3cd7a94b48d1d9c6b8af4b9203d69d37"></a>
  977. <h2 class="memtitle"><span class="permalink"><a href="#a3cd7a94b48d1d9c6b8af4b9203d69d37">&#9670;&nbsp;</a></span>MQTTClient_publish()</h2>
  978. <div class="memitem">
  979. <div class="memproto">
  980. <table class="memname">
  981. <tr>
  982. <td class="memname">int MQTTClient_publish </td>
  983. <td>(</td>
  984. <td class="paramtype">MQTTClient&#160;</td>
  985. <td class="paramname"><em>handle</em>, </td>
  986. </tr>
  987. <tr>
  988. <td class="paramkey"></td>
  989. <td></td>
  990. <td class="paramtype">const char *&#160;</td>
  991. <td class="paramname"><em>topicName</em>, </td>
  992. </tr>
  993. <tr>
  994. <td class="paramkey"></td>
  995. <td></td>
  996. <td class="paramtype">int&#160;</td>
  997. <td class="paramname"><em>payloadlen</em>, </td>
  998. </tr>
  999. <tr>
  1000. <td class="paramkey"></td>
  1001. <td></td>
  1002. <td class="paramtype">const void *&#160;</td>
  1003. <td class="paramname"><em>payload</em>, </td>
  1004. </tr>
  1005. <tr>
  1006. <td class="paramkey"></td>
  1007. <td></td>
  1008. <td class="paramtype">int&#160;</td>
  1009. <td class="paramname"><em>qos</em>, </td>
  1010. </tr>
  1011. <tr>
  1012. <td class="paramkey"></td>
  1013. <td></td>
  1014. <td class="paramtype">int&#160;</td>
  1015. <td class="paramname"><em>retained</em>, </td>
  1016. </tr>
  1017. <tr>
  1018. <td class="paramkey"></td>
  1019. <td></td>
  1020. <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
  1021. <td class="paramname"><em>dt</em>&#160;</td>
  1022. </tr>
  1023. <tr>
  1024. <td></td>
  1025. <td>)</td>
  1026. <td></td><td></td>
  1027. </tr>
  1028. </table>
  1029. </div><div class="memdoc">
  1030. <p>This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>). </p>
  1031. <p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  1032. <table class="params">
  1033. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1034. <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
  1035. <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
  1036. <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
  1037. <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
  1038. <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
  1039. <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  1040. </table>
  1041. </dd>
  1042. </dl>
  1043. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
  1044. <div class="dynheader">
  1045. Here is the call graph for this function:</div>
  1046. <div class="dyncontent">
  1047. <div class="center"><img src="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph.png" border="0" usemap="#MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" alt=""/></div>
  1048. <map name="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" id="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph">
  1049. <area shape="rect" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage())." alt="" coords="5,5,145,32"/>
  1050. <area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="193,5,340,32"/>
  1051. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="388,5,523,32"/>
  1052. </map>
  1053. </div>
  1054. </div>
  1055. </div>
  1056. <a id="a3c0ca97b393eee10d4f441ba68830e83"></a>
  1057. <h2 class="memtitle"><span class="permalink"><a href="#a3c0ca97b393eee10d4f441ba68830e83">&#9670;&nbsp;</a></span>MQTTClient_publish5()</h2>
  1058. <div class="memitem">
  1059. <div class="memproto">
  1060. <table class="memname">
  1061. <tr>
  1062. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publish5 </td>
  1063. <td>(</td>
  1064. <td class="paramtype">MQTTClient&#160;</td>
  1065. <td class="paramname"><em>handle</em>, </td>
  1066. </tr>
  1067. <tr>
  1068. <td class="paramkey"></td>
  1069. <td></td>
  1070. <td class="paramtype">const char *&#160;</td>
  1071. <td class="paramname"><em>topicName</em>, </td>
  1072. </tr>
  1073. <tr>
  1074. <td class="paramkey"></td>
  1075. <td></td>
  1076. <td class="paramtype">int&#160;</td>
  1077. <td class="paramname"><em>payloadlen</em>, </td>
  1078. </tr>
  1079. <tr>
  1080. <td class="paramkey"></td>
  1081. <td></td>
  1082. <td class="paramtype">const void *&#160;</td>
  1083. <td class="paramname"><em>payload</em>, </td>
  1084. </tr>
  1085. <tr>
  1086. <td class="paramkey"></td>
  1087. <td></td>
  1088. <td class="paramtype">int&#160;</td>
  1089. <td class="paramname"><em>qos</em>, </td>
  1090. </tr>
  1091. <tr>
  1092. <td class="paramkey"></td>
  1093. <td></td>
  1094. <td class="paramtype">int&#160;</td>
  1095. <td class="paramname"><em>retained</em>, </td>
  1096. </tr>
  1097. <tr>
  1098. <td class="paramkey"></td>
  1099. <td></td>
  1100. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  1101. <td class="paramname"><em>properties</em>, </td>
  1102. </tr>
  1103. <tr>
  1104. <td class="paramkey"></td>
  1105. <td></td>
  1106. <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
  1107. <td class="paramname"><em>dt</em>&#160;</td>
  1108. </tr>
  1109. <tr>
  1110. <td></td>
  1111. <td>)</td>
  1112. <td></td><td></td>
  1113. </tr>
  1114. </table>
  1115. </div><div class="memdoc">
  1116. <p>Attempts to publish a message to a given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5...">MQTTClient_publishMessage5()</a>). </p>
  1117. <p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  1118. <table class="params">
  1119. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1120. <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
  1121. <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
  1122. <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
  1123. <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
  1124. <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
  1125. <tr><td class="paramname">properties</td><td>the MQTT 5.0 properties to be used </td></tr>
  1126. <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  1127. </table>
  1128. </dd>
  1129. </dl>
  1130. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1131. <div class="dynheader">
  1132. Here is the call graph for this function:</div>
  1133. <div class="dyncontent">
  1134. <div class="center"><img src="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph.png" border="0" usemap="#MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" alt=""/></div>
  1135. <map name="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" id="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph">
  1136. <area shape="rect" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="5,5,152,32"/>
  1137. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="200,5,335,32"/>
  1138. </map>
  1139. </div>
  1140. </div>
  1141. </div>
  1142. <a id="a5e0cfa14237d7557bee2a59747ecadd3"></a>
  1143. <h2 class="memtitle"><span class="permalink"><a href="#a5e0cfa14237d7557bee2a59747ecadd3">&#9670;&nbsp;</a></span>MQTTClient_publishMessage()</h2>
  1144. <div class="memitem">
  1145. <div class="memproto">
  1146. <table class="memname">
  1147. <tr>
  1148. <td class="memname">int MQTTClient_publishMessage </td>
  1149. <td>(</td>
  1150. <td class="paramtype">MQTTClient&#160;</td>
  1151. <td class="paramname"><em>handle</em>, </td>
  1152. </tr>
  1153. <tr>
  1154. <td class="paramkey"></td>
  1155. <td></td>
  1156. <td class="paramtype">const char *&#160;</td>
  1157. <td class="paramname"><em>topicName</em>, </td>
  1158. </tr>
  1159. <tr>
  1160. <td class="paramkey"></td>
  1161. <td></td>
  1162. <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *&#160;</td>
  1163. <td class="paramname"><em>msg</em>, </td>
  1164. </tr>
  1165. <tr>
  1166. <td class="paramkey"></td>
  1167. <td></td>
  1168. <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
  1169. <td class="paramname"><em>dt</em>&#160;</td>
  1170. </tr>
  1171. <tr>
  1172. <td></td>
  1173. <td>)</td>
  1174. <td></td><td></td>
  1175. </tr>
  1176. </table>
  1177. </div><div class="memdoc">
  1178. <p>This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a>). </p>
  1179. <p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  1180. <table class="params">
  1181. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1182. <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
  1183. <tr><td class="paramname">msg</td><td>A pointer to a valid <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure containing the payload and attributes of the message to be published. </td></tr>
  1184. <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  1185. </table>
  1186. </dd>
  1187. </dl>
  1188. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
  1189. <div class="dynheader">
  1190. Here is the call graph for this function:</div>
  1191. <div class="dyncontent">
  1192. <div class="center"><img src="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph.png" border="0" usemap="#MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" alt=""/></div>
  1193. <map name="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" id="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph">
  1194. <area shape="rect" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish())." alt="" coords="5,5,199,32"/>
  1195. <area shape="rect" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5..." alt="" coords="247,5,447,32"/>
  1196. <area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="495,5,641,32"/>
  1197. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="689,5,824,32"/>
  1198. </map>
  1199. </div>
  1200. </div>
  1201. </div>
  1202. <a id="ae54936bf7680dcde353e6fc785a44461"></a>
  1203. <h2 class="memtitle"><span class="permalink"><a href="#ae54936bf7680dcde353e6fc785a44461">&#9670;&nbsp;</a></span>MQTTClient_publishMessage5()</h2>
  1204. <div class="memitem">
  1205. <div class="memproto">
  1206. <table class="memname">
  1207. <tr>
  1208. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publishMessage5 </td>
  1209. <td>(</td>
  1210. <td class="paramtype">MQTTClient&#160;</td>
  1211. <td class="paramname"><em>handle</em>, </td>
  1212. </tr>
  1213. <tr>
  1214. <td class="paramkey"></td>
  1215. <td></td>
  1216. <td class="paramtype">const char *&#160;</td>
  1217. <td class="paramname"><em>topicName</em>, </td>
  1218. </tr>
  1219. <tr>
  1220. <td class="paramkey"></td>
  1221. <td></td>
  1222. <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *&#160;</td>
  1223. <td class="paramname"><em>msg</em>, </td>
  1224. </tr>
  1225. <tr>
  1226. <td class="paramkey"></td>
  1227. <td></td>
  1228. <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
  1229. <td class="paramname"><em>dt</em>&#160;</td>
  1230. </tr>
  1231. <tr>
  1232. <td></td>
  1233. <td>)</td>
  1234. <td></td><td></td>
  1235. </tr>
  1236. </table>
  1237. </div><div class="memdoc">
  1238. <p>Attempts to publish a message to the given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes...">MQTTClient_publish5()</a>). </p>
  1239. <p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  1240. <table class="params">
  1241. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1242. <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
  1243. <tr><td class="paramname">msg</td><td>A pointer to a valid <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure containing the payload and attributes of the message to be published. </td></tr>
  1244. <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  1245. </table>
  1246. </dd>
  1247. </dl>
  1248. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1249. <div class="dynheader">
  1250. Here is the call graph for this function:</div>
  1251. <div class="dyncontent">
  1252. <div class="center"><img src="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph.png" border="0" usemap="#MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" alt=""/></div>
  1253. <map name="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" id="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph">
  1254. <area shape="rect" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5..." alt="" coords="5,5,205,32"/>
  1255. <area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="253,5,400,32"/>
  1256. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="448,5,583,32"/>
  1257. </map>
  1258. </div>
  1259. </div>
  1260. </div>
  1261. <a id="a4c2df88d00a3dadd510a8cb774739366"></a>
  1262. <h2 class="memtitle"><span class="permalink"><a href="#a4c2df88d00a3dadd510a8cb774739366">&#9670;&nbsp;</a></span>MQTTClient_receive()</h2>
  1263. <div class="memitem">
  1264. <div class="memproto">
  1265. <table class="memname">
  1266. <tr>
  1267. <td class="memname">int MQTTClient_receive </td>
  1268. <td>(</td>
  1269. <td class="paramtype">MQTTClient&#160;</td>
  1270. <td class="paramname"><em>handle</em>, </td>
  1271. </tr>
  1272. <tr>
  1273. <td class="paramkey"></td>
  1274. <td></td>
  1275. <td class="paramtype">char **&#160;</td>
  1276. <td class="paramname"><em>topicName</em>, </td>
  1277. </tr>
  1278. <tr>
  1279. <td class="paramkey"></td>
  1280. <td></td>
  1281. <td class="paramtype">int *&#160;</td>
  1282. <td class="paramname"><em>topicLen</em>, </td>
  1283. </tr>
  1284. <tr>
  1285. <td class="paramkey"></td>
  1286. <td></td>
  1287. <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **&#160;</td>
  1288. <td class="paramname"><em>message</em>, </td>
  1289. </tr>
  1290. <tr>
  1291. <td class="paramkey"></td>
  1292. <td></td>
  1293. <td class="paramtype">unsigned long&#160;</td>
  1294. <td class="paramname"><em>timeout</em>&#160;</td>
  1295. </tr>
  1296. <tr>
  1297. <td></td>
  1298. <td>)</td>
  1299. <td></td><td></td>
  1300. </tr>
  1301. </table>
  1302. </div><div class="memdoc">
  1303. <p>This function performs a synchronous receive of incoming messages. </p>
  1304. <p>It should be used only when the client application has not set callback methods to support asynchronous receipt of messages (see async and <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a>). Using this function allows a single-threaded client subscriber application to be written. When called, this function blocks until the next message arrives or the specified timeout expires (see also <a class="el" href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e" title="When implementing a single-threaded client, call this function periodically to allow processing of me...">MQTTClient_yield()</a>).</p>
  1305. <p><b>Important note:</b> The application must free() the memory allocated to the topic and the message when processing is complete (see <a class="el" href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31" title="This function frees memory allocated to an MQTT message, including the additional memory allocated to...">MQTTClient_freeMessage()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  1306. <table class="params">
  1307. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1308. <tr><td class="paramname">topicName</td><td>The address of a pointer to a topic. This function allocates the memory for the topic and returns it to the application by setting <em>topicName</em> to point to the topic. </td></tr>
  1309. <tr><td class="paramname">topicLen</td><td>The length of the topic. If the return code from this function is ::MQTTCLIENT_TOPICNAME_TRUNCATED, the topic contains embedded NULL characters and the full topic should be retrieved by using <em>topicLen</em>. </td></tr>
  1310. <tr><td class="paramname">message</td><td>The address of a pointer to the received message. This function allocates the memory for the message and returns it to the application by setting <em>message</em> to point to the received message. The pointer is set to NULL if the timeout expires. </td></tr>
  1311. <tr><td class="paramname">timeout</td><td>The length of time to wait for a message in milliseconds. </td></tr>
  1312. </table>
  1313. </dd>
  1314. </dl>
  1315. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS or ::MQTTCLIENT_TOPICNAME_TRUNCATED if a message is received. ::MQTTCLIENT_SUCCESS can also indicate that the timeout expired, in which case <em>message</em> is NULL. An error code is returned if there was a problem trying to receive a message. </dd></dl>
  1316. </div>
  1317. </div>
  1318. <a id="aad27d07782991a4937ebf2f39a021f83"></a>
  1319. <h2 class="memtitle"><span class="permalink"><a href="#aad27d07782991a4937ebf2f39a021f83">&#9670;&nbsp;</a></span>MQTTClient_setCallbacks()</h2>
  1320. <div class="memitem">
  1321. <div class="memproto">
  1322. <table class="memname">
  1323. <tr>
  1324. <td class="memname">int MQTTClient_setCallbacks </td>
  1325. <td>(</td>
  1326. <td class="paramtype">MQTTClient&#160;</td>
  1327. <td class="paramname"><em>handle</em>, </td>
  1328. </tr>
  1329. <tr>
  1330. <td class="paramkey"></td>
  1331. <td></td>
  1332. <td class="paramtype">void *&#160;</td>
  1333. <td class="paramname"><em>context</em>, </td>
  1334. </tr>
  1335. <tr>
  1336. <td class="paramkey"></td>
  1337. <td></td>
  1338. <td class="paramtype">MQTTClient_connectionLost *&#160;</td>
  1339. <td class="paramname"><em>cl</em>, </td>
  1340. </tr>
  1341. <tr>
  1342. <td class="paramkey"></td>
  1343. <td></td>
  1344. <td class="paramtype">MQTTClient_messageArrived *&#160;</td>
  1345. <td class="paramname"><em>ma</em>, </td>
  1346. </tr>
  1347. <tr>
  1348. <td class="paramkey"></td>
  1349. <td></td>
  1350. <td class="paramtype">MQTTClient_deliveryComplete *&#160;</td>
  1351. <td class="paramname"><em>dc</em>&#160;</td>
  1352. </tr>
  1353. <tr>
  1354. <td></td>
  1355. <td>)</td>
  1356. <td></td><td></td>
  1357. </tr>
  1358. </table>
  1359. </div><div class="memdoc">
  1360. <p>This function sets the callback functions for a specific client. </p>
  1361. <p>If your client application doesn't use a particular callback, set the relevant parameter to NULL. Calling <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> puts the client into multi-threaded mode. Any necessary message acknowledgements and status communications are handled in the background without any intervention from the client application. See async for more information.</p>
  1362. <p><b>Note:</b> The MQTT client must be disconnected when this function is called. </p><dl class="params"><dt>Parameters</dt><dd>
  1363. <table class="params">
  1364. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1365. <tr><td class="paramname">context</td><td>A pointer to any application-specific context. The the <em>context</em> pointer is passed to each of the callback functions to provide access to the context information in the callback. </td></tr>
  1366. <tr><td class="paramname">cl</td><td>A pointer to an MQTTClient_connectionLost() callback function. You can set this to NULL if your application doesn't handle disconnections. </td></tr>
  1367. <tr><td class="paramname">ma</td><td>A pointer to an MQTTClient_messageArrived() callback function. This callback function must be set when you call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a>, as otherwise there would be nowhere to deliver any incoming messages. </td></tr>
  1368. <tr><td class="paramname">dc</td><td>A pointer to an MQTTClient_deliveryComplete() callback function. You can set this to NULL if your application publishes synchronously or if you do not want to check for successful delivery. </td></tr>
  1369. </table>
  1370. </dd>
  1371. </dl>
  1372. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
  1373. <div class="dynheader">
  1374. Here is the call graph for this function:</div>
  1375. <div class="dyncontent">
  1376. <div class="center"><img src="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph.png" border="0" usemap="#MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" alt=""/></div>
  1377. <map name="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" id="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph">
  1378. <area shape="rect" title="This function sets the callback functions for a specific client." alt="" coords="5,5,180,32"/>
  1379. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="228,5,363,32"/>
  1380. </map>
  1381. </div>
  1382. </div>
  1383. </div>
  1384. <a id="a96067a2fb74d2a61c7e93015629548e0"></a>
  1385. <h2 class="memtitle"><span class="permalink"><a href="#a96067a2fb74d2a61c7e93015629548e0">&#9670;&nbsp;</a></span>MQTTClient_setCommandTimeout()</h2>
  1386. <div class="memitem">
  1387. <div class="memproto">
  1388. <table class="memname">
  1389. <tr>
  1390. <td class="memname">int MQTTClient_setCommandTimeout </td>
  1391. <td>(</td>
  1392. <td class="paramtype">MQTTClient&#160;</td>
  1393. <td class="paramname"><em>handle</em>, </td>
  1394. </tr>
  1395. <tr>
  1396. <td class="paramkey"></td>
  1397. <td></td>
  1398. <td class="paramtype">unsigned long&#160;</td>
  1399. <td class="paramname"><em>milliSeconds</em>&#160;</td>
  1400. </tr>
  1401. <tr>
  1402. <td></td>
  1403. <td>)</td>
  1404. <td></td><td></td>
  1405. </tr>
  1406. </table>
  1407. </div><div class="memdoc">
  1408. <p>Sets the timeout value for un/subscribe commands when waiting for the un/suback response from the server. </p>
  1409. <p>Values less than 5000 are not allowed. </p><dl class="params"><dt>Parameters</dt><dd>
  1410. <table class="params">
  1411. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1412. <tr><td class="paramname">milliSeconds</td><td>the maximum number of milliseconds to wait </td></tr>
  1413. </table>
  1414. </dd>
  1415. </dl>
  1416. <dl class="section return"><dt>Returns</dt><dd>MQTTCLIENT_SUCCESS or MQTTCLIENT_FAILURE </dd></dl>
  1417. </div>
  1418. </div>
  1419. <a id="adc7d708419664670063a0e7fd9c27bca"></a>
  1420. <h2 class="memtitle"><span class="permalink"><a href="#adc7d708419664670063a0e7fd9c27bca">&#9670;&nbsp;</a></span>MQTTClient_setDisconnected()</h2>
  1421. <div class="memitem">
  1422. <div class="memproto">
  1423. <table class="memname">
  1424. <tr>
  1425. <td class="memname">int MQTTClient_setDisconnected </td>
  1426. <td>(</td>
  1427. <td class="paramtype">MQTTClient&#160;</td>
  1428. <td class="paramname"><em>handle</em>, </td>
  1429. </tr>
  1430. <tr>
  1431. <td class="paramkey"></td>
  1432. <td></td>
  1433. <td class="paramtype">void *&#160;</td>
  1434. <td class="paramname"><em>context</em>, </td>
  1435. </tr>
  1436. <tr>
  1437. <td class="paramkey"></td>
  1438. <td></td>
  1439. <td class="paramtype">MQTTClient_disconnected *&#160;</td>
  1440. <td class="paramname"><em>co</em>&#160;</td>
  1441. </tr>
  1442. <tr>
  1443. <td></td>
  1444. <td>)</td>
  1445. <td></td><td></td>
  1446. </tr>
  1447. </table>
  1448. </div><div class="memdoc">
  1449. <p>Sets the MQTTClient_disconnected() callback function for a client. </p>
  1450. <p>This will be called if a disconnect packet is received from the server. Only valid for MQTT V5 and above. </p><dl class="params"><dt>Parameters</dt><dd>
  1451. <table class="params">
  1452. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1453. <tr><td class="paramname">context</td><td>A pointer to any application-specific context. The the <em>context</em> pointer is passed to each of the callback functions to provide access to the context information in the callback. </td></tr>
  1454. <tr><td class="paramname">co</td><td>A pointer to an MQTTClient_disconnected() callback function. NULL removes the callback setting. </td></tr>
  1455. </table>
  1456. </dd>
  1457. </dl>
  1458. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
  1459. <div class="dynheader">
  1460. Here is the call graph for this function:</div>
  1461. <div class="dyncontent">
  1462. <div class="center"><img src="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph.png" border="0" usemap="#MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" alt=""/></div>
  1463. <map name="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" id="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph">
  1464. <area shape="rect" title="Sets the MQTTClient_disconnected() callback function for a client." alt="" coords="5,5,201,32"/>
  1465. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="249,5,384,32"/>
  1466. </map>
  1467. </div>
  1468. </div>
  1469. </div>
  1470. <a id="a22870f94aa4cb1827626612f1ded7c69"></a>
  1471. <h2 class="memtitle"><span class="permalink"><a href="#a22870f94aa4cb1827626612f1ded7c69">&#9670;&nbsp;</a></span>MQTTClient_setTraceCallback()</h2>
  1472. <div class="memitem">
  1473. <div class="memproto">
  1474. <table class="memname">
  1475. <tr>
  1476. <td class="memname">void MQTTClient_setTraceCallback </td>
  1477. <td>(</td>
  1478. <td class="paramtype">MQTTClient_traceCallback *&#160;</td>
  1479. <td class="paramname"><em>callback</em></td><td>)</td>
  1480. <td></td>
  1481. </tr>
  1482. </table>
  1483. </div><div class="memdoc">
  1484. <p>This function sets the trace callback if needed. </p>
  1485. <p>If set to NULL, no trace information will be returned. The default trace level is MQTTASYNC_TRACE_MINIMUM. </p><dl class="params"><dt>Parameters</dt><dd>
  1486. <table class="params">
  1487. <tr><td class="paramname">callback</td><td>a pointer to the function which will handle the trace information </td></tr>
  1488. </table>
  1489. </dd>
  1490. </dl>
  1491. </div>
  1492. </div>
  1493. <a id="a4dfa35d29db54b10b15b8ac2d9a778be"></a>
  1494. <h2 class="memtitle"><span class="permalink"><a href="#a4dfa35d29db54b10b15b8ac2d9a778be">&#9670;&nbsp;</a></span>MQTTClient_setTraceLevel()</h2>
  1495. <div class="memitem">
  1496. <div class="memproto">
  1497. <table class="memname">
  1498. <tr>
  1499. <td class="memname">void MQTTClient_setTraceLevel </td>
  1500. <td>(</td>
  1501. <td class="paramtype">enum MQTTCLIENT_TRACE_LEVELS&#160;</td>
  1502. <td class="paramname"><em>level</em></td><td>)</td>
  1503. <td></td>
  1504. </tr>
  1505. </table>
  1506. </div><div class="memdoc">
  1507. <p>This function sets the level of trace information which will be returned in the trace callback. </p>
  1508. <dl class="params"><dt>Parameters</dt><dd>
  1509. <table class="params">
  1510. <tr><td class="paramname">level</td><td>the trace level required </td></tr>
  1511. </table>
  1512. </dd>
  1513. </dl>
  1514. </div>
  1515. </div>
  1516. <a id="a9defda2979f6fedaae64fd85f5c2f617"></a>
  1517. <h2 class="memtitle"><span class="permalink"><a href="#a9defda2979f6fedaae64fd85f5c2f617">&#9670;&nbsp;</a></span>MQTTClient_strerror()</h2>
  1518. <div class="memitem">
  1519. <div class="memproto">
  1520. <table class="memname">
  1521. <tr>
  1522. <td class="memname">const char* MQTTClient_strerror </td>
  1523. <td>(</td>
  1524. <td class="paramtype">int&#160;</td>
  1525. <td class="paramname"><em>code</em></td><td>)</td>
  1526. <td></td>
  1527. </tr>
  1528. </table>
  1529. </div><div class="memdoc">
  1530. <p>Returns a pointer to the string representation of the error or NULL. </p>
  1531. <p>Do not free after use. Returns NULL if the error code is unknown. </p>
  1532. <div class="dynheader">
  1533. Here is the call graph for this function:</div>
  1534. <div class="dyncontent">
  1535. <div class="center"><img src="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph.png" border="0" usemap="#MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" alt=""/></div>
  1536. <map name="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" id="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph">
  1537. <area shape="rect" title="Returns a pointer to the string representation of the error or NULL." alt="" coords="5,5,145,32"/>
  1538. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="193,5,237,32"/>
  1539. </map>
  1540. </div>
  1541. </div>
  1542. </div>
  1543. <a id="a9c1c28258f0d5c6a44ff53a98618f5f3"></a>
  1544. <h2 class="memtitle"><span class="permalink"><a href="#a9c1c28258f0d5c6a44ff53a98618f5f3">&#9670;&nbsp;</a></span>MQTTClient_subscribe()</h2>
  1545. <div class="memitem">
  1546. <div class="memproto">
  1547. <table class="memname">
  1548. <tr>
  1549. <td class="memname">int MQTTClient_subscribe </td>
  1550. <td>(</td>
  1551. <td class="paramtype">MQTTClient&#160;</td>
  1552. <td class="paramname"><em>handle</em>, </td>
  1553. </tr>
  1554. <tr>
  1555. <td class="paramkey"></td>
  1556. <td></td>
  1557. <td class="paramtype">const char *&#160;</td>
  1558. <td class="paramname"><em>topic</em>, </td>
  1559. </tr>
  1560. <tr>
  1561. <td class="paramkey"></td>
  1562. <td></td>
  1563. <td class="paramtype">int&#160;</td>
  1564. <td class="paramname"><em>qos</em>&#160;</td>
  1565. </tr>
  1566. <tr>
  1567. <td></td>
  1568. <td>)</td>
  1569. <td></td><td></td>
  1570. </tr>
  1571. </table>
  1572. </div><div class="memdoc">
  1573. <p>This function attempts to subscribe a client to a single topic, which may contain wildcards (see wildcard). </p>
  1574. <p>This call also specifies the qos requested for the subscription (see also <a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi...">MQTTClient_subscribeMany()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  1575. <table class="params">
  1576. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1577. <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
  1578. <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
  1579. </table>
  1580. </dd>
  1581. </dl>
  1582. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription request is successful. An error code is returned if there was a problem registering the subscription. </dd></dl>
  1583. <div class="dynheader">
  1584. Here is the call graph for this function:</div>
  1585. <div class="dyncontent">
  1586. <div class="center"><img src="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph.png" border="0" usemap="#MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" alt=""/></div>
  1587. <map name="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" id="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph">
  1588. <area shape="rect" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild..." alt="" coords="5,5,160,32"/>
  1589. <area shape="rect" href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d" title="This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain w..." alt="" coords="208,5,371,32"/>
  1590. <area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="419,5,612,32"/>
  1591. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="660,5,795,32"/>
  1592. </map>
  1593. </div>
  1594. </div>
  1595. </div>
  1596. <a id="af35ab7375435f7b6388c5ff4610dad3d"></a>
  1597. <h2 class="memtitle"><span class="permalink"><a href="#af35ab7375435f7b6388c5ff4610dad3d">&#9670;&nbsp;</a></span>MQTTClient_subscribe5()</h2>
  1598. <div class="memitem">
  1599. <div class="memproto">
  1600. <table class="memname">
  1601. <tr>
  1602. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribe5 </td>
  1603. <td>(</td>
  1604. <td class="paramtype">MQTTClient&#160;</td>
  1605. <td class="paramname"><em>handle</em>, </td>
  1606. </tr>
  1607. <tr>
  1608. <td class="paramkey"></td>
  1609. <td></td>
  1610. <td class="paramtype">const char *&#160;</td>
  1611. <td class="paramname"><em>topic</em>, </td>
  1612. </tr>
  1613. <tr>
  1614. <td class="paramkey"></td>
  1615. <td></td>
  1616. <td class="paramtype">int&#160;</td>
  1617. <td class="paramname"><em>qos</em>, </td>
  1618. </tr>
  1619. <tr>
  1620. <td class="paramkey"></td>
  1621. <td></td>
  1622. <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *&#160;</td>
  1623. <td class="paramname"><em>opts</em>, </td>
  1624. </tr>
  1625. <tr>
  1626. <td class="paramkey"></td>
  1627. <td></td>
  1628. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  1629. <td class="paramname"><em>props</em>&#160;</td>
  1630. </tr>
  1631. <tr>
  1632. <td></td>
  1633. <td>)</td>
  1634. <td></td><td></td>
  1635. </tr>
  1636. </table>
  1637. </div><div class="memdoc">
  1638. <p>This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain wildcards (see wildcard). </p>
  1639. <p>This call also specifies the qos requested for the subscription (see also <a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi...">MQTTClient_subscribeMany()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  1640. <table class="params">
  1641. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1642. <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
  1643. <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
  1644. <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
  1645. <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  1646. </table>
  1647. </dd>
  1648. </dl>
  1649. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1650. <div class="dynheader">
  1651. Here is the call graph for this function:</div>
  1652. <div class="dyncontent">
  1653. <div class="center"><img src="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph.png" border="0" usemap="#MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" alt=""/></div>
  1654. <map name="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" id="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph">
  1655. <area shape="rect" title="This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain w..." alt="" coords="5,5,168,32"/>
  1656. <area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="216,5,409,32"/>
  1657. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="457,5,592,32"/>
  1658. </map>
  1659. </div>
  1660. </div>
  1661. </div>
  1662. <a id="a92fa1c13f3db8399e042fbdbdfb692b3"></a>
  1663. <h2 class="memtitle"><span class="permalink"><a href="#a92fa1c13f3db8399e042fbdbdfb692b3">&#9670;&nbsp;</a></span>MQTTClient_subscribeMany()</h2>
  1664. <div class="memitem">
  1665. <div class="memproto">
  1666. <table class="memname">
  1667. <tr>
  1668. <td class="memname">int MQTTClient_subscribeMany </td>
  1669. <td>(</td>
  1670. <td class="paramtype">MQTTClient&#160;</td>
  1671. <td class="paramname"><em>handle</em>, </td>
  1672. </tr>
  1673. <tr>
  1674. <td class="paramkey"></td>
  1675. <td></td>
  1676. <td class="paramtype">int&#160;</td>
  1677. <td class="paramname"><em>count</em>, </td>
  1678. </tr>
  1679. <tr>
  1680. <td class="paramkey"></td>
  1681. <td></td>
  1682. <td class="paramtype">char *const *&#160;</td>
  1683. <td class="paramname"><em>topic</em>, </td>
  1684. </tr>
  1685. <tr>
  1686. <td class="paramkey"></td>
  1687. <td></td>
  1688. <td class="paramtype">int *&#160;</td>
  1689. <td class="paramname"><em>qos</em>&#160;</td>
  1690. </tr>
  1691. <tr>
  1692. <td></td>
  1693. <td>)</td>
  1694. <td></td><td></td>
  1695. </tr>
  1696. </table>
  1697. </div><div class="memdoc">
  1698. <p>This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wildcard). </p>
  1699. <p>This call also specifies the qos requested for each topic (see also <a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild...">MQTTClient_subscribe()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  1700. <table class="params">
  1701. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1702. <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
  1703. <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to topics, each of which may include wildcards. </td></tr>
  1704. <tr><td class="paramname">qos</td><td>An array (of length <em>count</em>) of qos values. qos[n] is the requested QoS for topic[n]. </td></tr>
  1705. </table>
  1706. </dd>
  1707. </dl>
  1708. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription request is successful. An error code is returned if there was a problem registering the subscriptions. </dd></dl>
  1709. <div class="dynheader">
  1710. Here is the call graph for this function:</div>
  1711. <div class="dyncontent">
  1712. <div class="center"><img src="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph.png" border="0" usemap="#MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" alt=""/></div>
  1713. <map name="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" id="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph">
  1714. <area shape="rect" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi..." alt="" coords="5,5,192,32"/>
  1715. <area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="240,5,433,32"/>
  1716. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="481,5,616,32"/>
  1717. </map>
  1718. </div>
  1719. </div>
  1720. </div>
  1721. <a id="a5390c2402f135c12826ffbf6fc261f7c"></a>
  1722. <h2 class="memtitle"><span class="permalink"><a href="#a5390c2402f135c12826ffbf6fc261f7c">&#9670;&nbsp;</a></span>MQTTClient_subscribeMany5()</h2>
  1723. <div class="memitem">
  1724. <div class="memproto">
  1725. <table class="memname">
  1726. <tr>
  1727. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribeMany5 </td>
  1728. <td>(</td>
  1729. <td class="paramtype">MQTTClient&#160;</td>
  1730. <td class="paramname"><em>handle</em>, </td>
  1731. </tr>
  1732. <tr>
  1733. <td class="paramkey"></td>
  1734. <td></td>
  1735. <td class="paramtype">int&#160;</td>
  1736. <td class="paramname"><em>count</em>, </td>
  1737. </tr>
  1738. <tr>
  1739. <td class="paramkey"></td>
  1740. <td></td>
  1741. <td class="paramtype">char *const *&#160;</td>
  1742. <td class="paramname"><em>topic</em>, </td>
  1743. </tr>
  1744. <tr>
  1745. <td class="paramkey"></td>
  1746. <td></td>
  1747. <td class="paramtype">int *&#160;</td>
  1748. <td class="paramname"><em>qos</em>, </td>
  1749. </tr>
  1750. <tr>
  1751. <td class="paramkey"></td>
  1752. <td></td>
  1753. <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *&#160;</td>
  1754. <td class="paramname"><em>opts</em>, </td>
  1755. </tr>
  1756. <tr>
  1757. <td class="paramkey"></td>
  1758. <td></td>
  1759. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  1760. <td class="paramname"><em>props</em>&#160;</td>
  1761. </tr>
  1762. <tr>
  1763. <td></td>
  1764. <td>)</td>
  1765. <td></td><td></td>
  1766. </tr>
  1767. </table>
  1768. </div><div class="memdoc">
  1769. <p>This function attempts to subscribe an MQTT version 5.0 client to a list of topics, which may contain wildcards (see wildcard). </p>
  1770. <p>This call also specifies the qos requested for each topic (see also <a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild...">MQTTClient_subscribe()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  1771. <table class="params">
  1772. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1773. <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
  1774. <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to topics, each of which may include wildcards. </td></tr>
  1775. <tr><td class="paramname">qos</td><td>An array (of length <em>count</em>) of qos values. qos[n] is the requested QoS for topic[n]. </td></tr>
  1776. <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
  1777. <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  1778. </table>
  1779. </dd>
  1780. </dl>
  1781. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1782. <div class="dynheader">
  1783. Here is the call graph for this function:</div>
  1784. <div class="dyncontent">
  1785. <div class="center"><img src="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph.png" border="0" usemap="#MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" alt=""/></div>
  1786. <map name="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" id="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph">
  1787. <area shape="rect" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="5,5,199,32"/>
  1788. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="247,5,381,32"/>
  1789. </map>
  1790. </div>
  1791. </div>
  1792. </div>
  1793. <a id="aa8731be3dbc6a25f41f037f8bbbb054b"></a>
  1794. <h2 class="memtitle"><span class="permalink"><a href="#aa8731be3dbc6a25f41f037f8bbbb054b">&#9670;&nbsp;</a></span>MQTTClient_unsubscribe()</h2>
  1795. <div class="memitem">
  1796. <div class="memproto">
  1797. <table class="memname">
  1798. <tr>
  1799. <td class="memname">int MQTTClient_unsubscribe </td>
  1800. <td>(</td>
  1801. <td class="paramtype">MQTTClient&#160;</td>
  1802. <td class="paramname"><em>handle</em>, </td>
  1803. </tr>
  1804. <tr>
  1805. <td class="paramkey"></td>
  1806. <td></td>
  1807. <td class="paramtype">const char *&#160;</td>
  1808. <td class="paramname"><em>topic</em>&#160;</td>
  1809. </tr>
  1810. <tr>
  1811. <td></td>
  1812. <td>)</td>
  1813. <td></td><td></td>
  1814. </tr>
  1815. </table>
  1816. </div><div class="memdoc">
  1817. <p>This function attempts to remove an existing subscription made by the specified client. </p>
  1818. <dl class="params"><dt>Parameters</dt><dd>
  1819. <table class="params">
  1820. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1821. <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
  1822. </table>
  1823. </dd>
  1824. </dl>
  1825. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription is removed. An error code is returned if there was a problem removing the subscription. </dd></dl>
  1826. <div class="dynheader">
  1827. Here is the call graph for this function:</div>
  1828. <div class="dyncontent">
  1829. <div class="center"><img src="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph.png" border="0" usemap="#MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" alt=""/></div>
  1830. <map name="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" id="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph">
  1831. <area shape="rect" title="This function attempts to remove an existing subscription made by the specified client." alt="" coords="5,5,175,32"/>
  1832. <area shape="rect" href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48" title="This function attempts to remove an existing subscription made by the specified client using MQTT 5...." alt="" coords="223,5,399,32"/>
  1833. <area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="447,5,653,32"/>
  1834. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="701,5,836,32"/>
  1835. </map>
  1836. </div>
  1837. </div>
  1838. </div>
  1839. <a id="a58356c13867f18df60fd4c7ec9457c48"></a>
  1840. <h2 class="memtitle"><span class="permalink"><a href="#a58356c13867f18df60fd4c7ec9457c48">&#9670;&nbsp;</a></span>MQTTClient_unsubscribe5()</h2>
  1841. <div class="memitem">
  1842. <div class="memproto">
  1843. <table class="memname">
  1844. <tr>
  1845. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribe5 </td>
  1846. <td>(</td>
  1847. <td class="paramtype">MQTTClient&#160;</td>
  1848. <td class="paramname"><em>handle</em>, </td>
  1849. </tr>
  1850. <tr>
  1851. <td class="paramkey"></td>
  1852. <td></td>
  1853. <td class="paramtype">const char *&#160;</td>
  1854. <td class="paramname"><em>topic</em>, </td>
  1855. </tr>
  1856. <tr>
  1857. <td class="paramkey"></td>
  1858. <td></td>
  1859. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  1860. <td class="paramname"><em>props</em>&#160;</td>
  1861. </tr>
  1862. <tr>
  1863. <td></td>
  1864. <td>)</td>
  1865. <td></td><td></td>
  1866. </tr>
  1867. </table>
  1868. </div><div class="memdoc">
  1869. <p>This function attempts to remove an existing subscription made by the specified client using MQTT 5.0. </p>
  1870. <dl class="params"><dt>Parameters</dt><dd>
  1871. <table class="params">
  1872. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1873. <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
  1874. <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  1875. </table>
  1876. </dd>
  1877. </dl>
  1878. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1879. <div class="dynheader">
  1880. Here is the call graph for this function:</div>
  1881. <div class="dyncontent">
  1882. <div class="center"><img src="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph.png" border="0" usemap="#MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" alt=""/></div>
  1883. <map name="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" id="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph">
  1884. <area shape="rect" title="This function attempts to remove an existing subscription made by the specified client using MQTT 5...." alt="" coords="5,5,181,32"/>
  1885. <area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="229,5,436,32"/>
  1886. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="484,5,619,32"/>
  1887. </map>
  1888. </div>
  1889. </div>
  1890. </div>
  1891. <a id="a50abbce720d50b9f84b97ff9fa1f546d"></a>
  1892. <h2 class="memtitle"><span class="permalink"><a href="#a50abbce720d50b9f84b97ff9fa1f546d">&#9670;&nbsp;</a></span>MQTTClient_unsubscribeMany()</h2>
  1893. <div class="memitem">
  1894. <div class="memproto">
  1895. <table class="memname">
  1896. <tr>
  1897. <td class="memname">int MQTTClient_unsubscribeMany </td>
  1898. <td>(</td>
  1899. <td class="paramtype">MQTTClient&#160;</td>
  1900. <td class="paramname"><em>handle</em>, </td>
  1901. </tr>
  1902. <tr>
  1903. <td class="paramkey"></td>
  1904. <td></td>
  1905. <td class="paramtype">int&#160;</td>
  1906. <td class="paramname"><em>count</em>, </td>
  1907. </tr>
  1908. <tr>
  1909. <td class="paramkey"></td>
  1910. <td></td>
  1911. <td class="paramtype">char *const *&#160;</td>
  1912. <td class="paramname"><em>topic</em>&#160;</td>
  1913. </tr>
  1914. <tr>
  1915. <td></td>
  1916. <td>)</td>
  1917. <td></td><td></td>
  1918. </tr>
  1919. </table>
  1920. </div><div class="memdoc">
  1921. <p>This function attempts to remove existing subscriptions to a list of topics made by the specified client. </p>
  1922. <dl class="params"><dt>Parameters</dt><dd>
  1923. <table class="params">
  1924. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1925. <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
  1926. <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to the topics of the subscriptions to be removed, each of which may include wildcards. </td></tr>
  1927. </table>
  1928. </dd>
  1929. </dl>
  1930. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscriptions are removed. An error code is returned if there was a problem removing the subscriptions. </dd></dl>
  1931. <div class="dynheader">
  1932. Here is the call graph for this function:</div>
  1933. <div class="dyncontent">
  1934. <div class="center"><img src="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph.png" border="0" usemap="#MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" alt=""/></div>
  1935. <map name="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" id="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph">
  1936. <area shape="rect" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="5,5,205,32"/>
  1937. <area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="253,5,460,32"/>
  1938. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="508,5,643,32"/>
  1939. </map>
  1940. </div>
  1941. </div>
  1942. </div>
  1943. <a id="a46bdb532d2153110ccffb2f0748d1ba5"></a>
  1944. <h2 class="memtitle"><span class="permalink"><a href="#a46bdb532d2153110ccffb2f0748d1ba5">&#9670;&nbsp;</a></span>MQTTClient_unsubscribeMany5()</h2>
  1945. <div class="memitem">
  1946. <div class="memproto">
  1947. <table class="memname">
  1948. <tr>
  1949. <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribeMany5 </td>
  1950. <td>(</td>
  1951. <td class="paramtype">MQTTClient&#160;</td>
  1952. <td class="paramname"><em>handle</em>, </td>
  1953. </tr>
  1954. <tr>
  1955. <td class="paramkey"></td>
  1956. <td></td>
  1957. <td class="paramtype">int&#160;</td>
  1958. <td class="paramname"><em>count</em>, </td>
  1959. </tr>
  1960. <tr>
  1961. <td class="paramkey"></td>
  1962. <td></td>
  1963. <td class="paramtype">char *const *&#160;</td>
  1964. <td class="paramname"><em>topic</em>, </td>
  1965. </tr>
  1966. <tr>
  1967. <td class="paramkey"></td>
  1968. <td></td>
  1969. <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
  1970. <td class="paramname"><em>props</em>&#160;</td>
  1971. </tr>
  1972. <tr>
  1973. <td></td>
  1974. <td>)</td>
  1975. <td></td><td></td>
  1976. </tr>
  1977. </table>
  1978. </div><div class="memdoc">
  1979. <p>This function attempts to remove existing subscriptions to a list of topics made by the specified client using MQTT version 5.0. </p>
  1980. <dl class="params"><dt>Parameters</dt><dd>
  1981. <table class="params">
  1982. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  1983. <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
  1984. <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to the topics of the subscriptions to be removed, each of which may include wildcards. </td></tr>
  1985. <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  1986. </table>
  1987. </dd>
  1988. </dl>
  1989. <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
  1990. <div class="dynheader">
  1991. Here is the call graph for this function:</div>
  1992. <div class="dyncontent">
  1993. <div class="center"><img src="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph.png" border="0" usemap="#MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" alt=""/></div>
  1994. <map name="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" id="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph">
  1995. <area shape="rect" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="5,5,212,32"/>
  1996. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
  1997. </map>
  1998. </div>
  1999. </div>
  2000. </div>
  2001. <a id="ab8786efdd6c3a50c6ca33cfb5d8fc283"></a>
  2002. <h2 class="memtitle"><span class="permalink"><a href="#ab8786efdd6c3a50c6ca33cfb5d8fc283">&#9670;&nbsp;</a></span>MQTTClient_waitForCompletion()</h2>
  2003. <div class="memitem">
  2004. <div class="memproto">
  2005. <table class="memname">
  2006. <tr>
  2007. <td class="memname">int MQTTClient_waitForCompletion </td>
  2008. <td>(</td>
  2009. <td class="paramtype">MQTTClient&#160;</td>
  2010. <td class="paramname"><em>handle</em>, </td>
  2011. </tr>
  2012. <tr>
  2013. <td class="paramkey"></td>
  2014. <td></td>
  2015. <td class="paramtype">MQTTClient_deliveryToken&#160;</td>
  2016. <td class="paramname"><em>dt</em>, </td>
  2017. </tr>
  2018. <tr>
  2019. <td class="paramkey"></td>
  2020. <td></td>
  2021. <td class="paramtype">unsigned long&#160;</td>
  2022. <td class="paramname"><em>timeout</em>&#160;</td>
  2023. </tr>
  2024. <tr>
  2025. <td></td>
  2026. <td>)</td>
  2027. <td></td><td></td>
  2028. </tr>
  2029. </table>
  2030. </div><div class="memdoc">
  2031. <p>This function is called by the client application to synchronize execution of the main thread with completed publication of a message. </p>
  2032. <p>When called, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion()</a> blocks execution until the message has been successful delivered or the specified timeout has expired. See async. </p><dl class="params"><dt>Parameters</dt><dd>
  2033. <table class="params">
  2034. <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  2035. <tr><td class="paramname">dt</td><td>The ::MQTTClient_deliveryToken that represents the message being tested for successful delivery. Delivery tokens are issued by the publishing functions <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a> and <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>. </td></tr>
  2036. <tr><td class="paramname">timeout</td><td>The maximum time to wait in milliseconds. </td></tr>
  2037. </table>
  2038. </dd>
  2039. </dl>
  2040. <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message was successfully delivered. An error code is returned if the timeout expires or there was a problem checking the token. </dd></dl>
  2041. <div class="dynheader">
  2042. Here is the call graph for this function:</div>
  2043. <div class="dyncontent">
  2044. <div class="center"><img src="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph.png" border="0" usemap="#MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" alt=""/></div>
  2045. <map name="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" id="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph">
  2046. <area shape="rect" title="This function is called by the client application to synchronize execution of the main thread with co..." alt="" coords="5,5,212,32"/>
  2047. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
  2048. </map>
  2049. </div>
  2050. </div>
  2051. </div>
  2052. <a id="a8ad3d29864a9ca08202b0832e0f6678e"></a>
  2053. <h2 class="memtitle"><span class="permalink"><a href="#a8ad3d29864a9ca08202b0832e0f6678e">&#9670;&nbsp;</a></span>MQTTClient_yield()</h2>
  2054. <div class="memitem">
  2055. <div class="memproto">
  2056. <table class="memname">
  2057. <tr>
  2058. <td class="memname">void MQTTClient_yield </td>
  2059. <td>(</td>
  2060. <td class="paramtype">void&#160;</td>
  2061. <td class="paramname"></td><td>)</td>
  2062. <td></td>
  2063. </tr>
  2064. </table>
  2065. </div><div class="memdoc">
  2066. <p>When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings. </p>
  2067. <p>If the application is calling <a class="el" href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366" title="This function performs a synchronous receive of incoming messages.">MQTTClient_receive()</a> regularly, then it is not necessary to call this function. </p>
  2068. </div>
  2069. </div>
  2070. <a id="acdcf1aefca1dbb3d1b3d36c9bbaf3760"></a>
  2071. <h2 class="memtitle"><span class="permalink"><a href="#acdcf1aefca1dbb3d1b3d36c9bbaf3760">&#9670;&nbsp;</a></span>MQTTProtocol_checkPendingWrites()</h2>
  2072. <div class="memitem">
  2073. <div class="memproto">
  2074. <table class="mlabels">
  2075. <tr>
  2076. <td class="mlabels-left">
  2077. <table class="memname">
  2078. <tr>
  2079. <td class="memname">static void MQTTProtocol_checkPendingWrites </td>
  2080. <td>(</td>
  2081. <td class="paramtype">void&#160;</td>
  2082. <td class="paramname"></td><td>)</td>
  2083. <td></td>
  2084. </tr>
  2085. </table>
  2086. </td>
  2087. <td class="mlabels-right">
  2088. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  2089. </tr>
  2090. </table>
  2091. </div><div class="memdoc">
  2092. <p>See if any pending writes have been completed, and cleanup if so. </p>
  2093. <p>Cleaning up means removing any publication data that was stored because the write did not originally complete. </p>
  2094. <div class="dynheader">
  2095. Here is the call graph for this function:</div>
  2096. <div class="dyncontent">
  2097. <div class="center"><img src="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph.png" border="0" usemap="#MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" alt=""/></div>
  2098. <map name="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" id="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph">
  2099. <area shape="rect" title="See if any pending writes have been completed, and cleanup if so." alt="" coords="5,61,201,102"/>
  2100. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="931,17,1049,44"/>
  2101. <area shape="rect" href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5" title="Removes and frees an item in a list by comparing the pointer to the content." alt="" coords="519,43,611,69"/>
  2102. <area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="249,93,471,120"/>
  2103. <area shape="rect" href="Socket_8c.html#a457d9a6a9d8e886c46fcd0c096f45614" title="Indicate whether any data is pending outbound for a socket." alt="" coords="276,144,444,171"/>
  2104. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="659,43,740,69"/>
  2105. <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="788,43,883,69"/>
  2106. <area shape="rect" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452" title="List callback function for comparing integers." alt="" coords="521,144,608,171"/>
  2107. </map>
  2108. </div>
  2109. </div>
  2110. </div>
  2111. <a id="a01bd2c5f98ec5c0636a106db33f2b01b"></a>
  2112. <h2 class="memtitle"><span class="permalink"><a href="#a01bd2c5f98ec5c0636a106db33f2b01b">&#9670;&nbsp;</a></span>MQTTResponse_free()</h2>
  2113. <div class="memitem">
  2114. <div class="memproto">
  2115. <table class="memname">
  2116. <tr>
  2117. <td class="memname">void MQTTResponse_free </td>
  2118. <td>(</td>
  2119. <td class="paramtype"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td>
  2120. <td class="paramname"><em>response</em></td><td>)</td>
  2121. <td></td>
  2122. </tr>
  2123. </table>
  2124. </div><div class="memdoc">
  2125. <p>Frees the storage associated with the MQTT response. </p>
  2126. <dl class="params"><dt>Parameters</dt><dd>
  2127. <table class="params">
  2128. <tr><td class="paramname">response</td><td>the response structure to be freed </td></tr>
  2129. </table>
  2130. </dd>
  2131. </dl>
  2132. </div>
  2133. </div>
  2134. <h2 class="groupheader">Variable Documentation</h2>
  2135. <a id="a7de1b785bccb15bfa46dcf3a6706aad0"></a>
  2136. <h2 class="memtitle"><span class="permalink"><a href="#a7de1b785bccb15bfa46dcf3a6706aad0">&#9670;&nbsp;</a></span>ClientState</h2>
  2137. <div class="memitem">
  2138. <div class="memproto">
  2139. <table class="mlabels">
  2140. <tr>
  2141. <td class="mlabels-left">
  2142. <table class="memname">
  2143. <tr>
  2144. <td class="memname"><a class="el" href="structClientStates.html">ClientStates</a> ClientState</td>
  2145. </tr>
  2146. </table>
  2147. </td>
  2148. <td class="mlabels-right">
  2149. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  2150. </tr>
  2151. </table>
  2152. </div><div class="memdoc">
  2153. <b>Initial value:</b><div class="fragment"><div class="line">=</div>
  2154. <div class="line">{</div>
  2155. <div class="line"> CLIENT_VERSION, </div>
  2156. <div class="line"> NULL </div>
  2157. <div class="line">}</div>
  2158. </div><!-- fragment -->
  2159. </div>
  2160. </div>
  2161. </div><!-- contents -->
  2162. <!-- start footer part -->
  2163. <hr class="footer"/><address class="footer"><small>
  2164. 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">
  2165. <img class="footer" src="doxygen.png" alt="doxygen"/>
  2166. </a> 1.8.17
  2167. </small></address>
  2168. </body>
  2169. </html>