1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.17"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>MQTT C Client Libraries Internals: MQTTClient.c File Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">MQTT C Client Libraries Internals
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.17 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#nested-classes">Data Structures</a> |
- <a href="#define-members">Macros</a> |
- <a href="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">MQTTClient.c File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Synchronous API implementation.
- <a href="#details">More...</a></p>
- <div class="textblock"><code>#include <stdlib.h></code><br />
- <code>#include <string.h></code><br />
- <code>#include <sys/time.h></code><br />
- <code>#include "MQTTClient.h"</code><br />
- <code>#include "MQTTPersistence.h"</code><br />
- <code>#include "utf-8.h"</code><br />
- <code>#include "MQTTProtocol.h"</code><br />
- <code>#include "MQTTProtocolOut.h"</code><br />
- <code>#include "Thread.h"</code><br />
- <code>#include "SocketBuffer.h"</code><br />
- <code>#include "StackTrace.h"</code><br />
- <code>#include "Heap.h"</code><br />
- <code>#include "OsWrapper.h"</code><br />
- <code>#include "VersionInfo.h"</code><br />
- <code>#include "WebSocket.h"</code><br />
- <code>#include "Proxy.h"</code><br />
- </div><div class="textblock"><div class="dynheader">
- Include dependency graph for MQTTClient.c:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c__incl.png" border="0" usemap="#MQTTClient_8c" alt=""/></div>
- <map name="MQTTClient_8c" id="MQTTClient_8c">
- <area shape="rect" title="Synchronous API implementation." alt="" coords="121,5,224,32"/>
- <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
- <area shape="rect" title=" " alt="" coords="93,80,157,107"/>
- <area shape="rect" title=" " alt="" coords="181,80,263,107"/>
- <area shape="rect" title=" " alt="" coords="287,80,386,107"/>
- </map>
- </div>
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Data Structures</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structqEntry.html">qEntry</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClients.html">MQTTClients</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structprops__rc__parms.html">props_rc_parms</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
- Macros</h2></td></tr>
- <tr class="memitem:a62b7ecff86a928a545160725cc9e2430"><td class="memItemLeft" align="right" valign="top"><a id="a62b7ecff86a928a545160725cc9e2430"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_SSL</b>   "ssl://"</td></tr>
- <tr class="separator:a62b7ecff86a928a545160725cc9e2430"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab0a2eaec459e41189e500536109bbe85"><td class="memItemLeft" align="right" valign="top"><a id="ab0a2eaec459e41189e500536109bbe85"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_MQTTS</b>   "mqtts://"</td></tr>
- <tr class="separator:ab0a2eaec459e41189e500536109bbe85"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memItemLeft" align="right" valign="top"><a id="aff8054f166c9eb81b4e7695bc7f1ec79"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_TCP</b>   "tcp://"</td></tr>
- <tr class="separator:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memItemLeft" align="right" valign="top"><a id="a61fc7ec5121ebee456c2f4bf445e5965"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_MQTT</b>   "mqtt://"</td></tr>
- <tr class="separator:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5771cb458542c28e7bd49a92f2840828"><td class="memItemLeft" align="right" valign="top"><a id="a5771cb458542c28e7bd49a92f2840828"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_WS</b>   "ws://"</td></tr>
- <tr class="separator:a5771cb458542c28e7bd49a92f2840828"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adba1cd25f9e81e0d2b88c905896efb81"><td class="memItemLeft" align="right" valign="top"><a id="adba1cd25f9e81e0d2b88c905896efb81"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>URI_WSS</b>   "wss://"</td></tr>
- <tr class="separator:adba1cd25f9e81e0d2b88c905896efb81"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memItemLeft" align="right" valign="top"><a id="a9aa60e1ead64be77ad551e745cbfd4d3"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>WINAPI</b></td></tr>
- <tr class="separator:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a48e5d65228327c5f6ad9503b0a72db32"><td class="memItemLeft" align="right" valign="top"><a id="a48e5d65228327c5f6ad9503b0a72db32"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>MAX_INFO_STRINGS</b>   8</td></tr>
- <tr class="separator:a48e5d65228327c5f6ad9503b0a72db32"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a4ea0fd02f2e44f48a3285a9191861373"><td class="memItemLeft" align="right" valign="top"><a id="a4ea0fd02f2e44f48a3285a9191861373"></a>
- int </td><td class="memItemRight" valign="bottom"><b>MQTTClient_init</b> (void)</td></tr>
- <tr class="separator:a4ea0fd02f2e44f48a3285a9191861373"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a21804ede1a506d1d69a472bc30acc8ba"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="memdesc:a21804ede1a506d1d69a472bc30acc8ba"><td class="mdescLeft"> </td><td class="mdescRight">Global init of mqtt library. <a href="MQTTClient_8c.html#a21804ede1a506d1d69a472bc30acc8ba">More...</a><br /></td></tr>
- <tr class="separator:a21804ede1a506d1d69a472bc30acc8ba"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae32040ed631457a2881fc0ec456a1daf"><td class="memItemLeft" align="right" valign="top"><a id="ae32040ed631457a2881fc0ec456a1daf"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>MQTTClient_terminate</b> (void)</td></tr>
- <tr class="separator:ae32040ed631457a2881fc0ec456a1daf"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab22f406368730d3782d299bdc12277c9"><td class="memItemLeft" align="right" valign="top"><a id="ab22f406368730d3782d299bdc12277c9"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>MQTTClient_emptyMessageQueue</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
- <tr class="separator:ab22f406368730d3782d299bdc12277c9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memItemLeft" align="right" valign="top"><a id="a2f68a4519b5e0dc57a1d3ead092b52e4"></a>
- static int </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>
- <tr class="separator:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ac35494adea1f11d3480b50b8a7f0c17d">clientSockCompare</a> (void *a, void *b)</td></tr>
- <tr class="memdesc:ac35494adea1f11d3480b50b8a7f0c17d"><td class="mdescLeft"> </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>
- <tr class="separator:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0c0d8194bf8a449928881cf83276728e"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a0c0d8194bf8a449928881cf83276728e">connectionLost_call</a> (void *context)</td></tr>
- <tr class="memdesc:a0c0d8194bf8a449928881cf83276728e"><td class="mdescLeft"> </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>
- <tr class="separator:a0c0d8194bf8a449928881cf83276728e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memItemLeft" align="right" valign="top"><a id="a60a613bf8f5dc3d15687ead12b57a5c1"></a>
- static thread_return_type WINAPI </td><td class="memItemRight" valign="bottom"><b>MQTTClient_run</b> (void *n)</td></tr>
- <tr class="separator:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a901ba852d2bc777276dfcf6dd834388b"><td class="memItemLeft" align="right" valign="top"><a id="a901ba852d2bc777276dfcf6dd834388b"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>MQTTClient_stop</b> (void)</td></tr>
- <tr class="separator:a901ba852d2bc777276dfcf6dd834388b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3d115d3279d50ec207fa958ebe14c07c"><td class="memItemLeft" align="right" valign="top"><a id="a3d115d3279d50ec207fa958ebe14c07c"></a>
- static void </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>
- <tr class="separator:a3d115d3279d50ec207fa958ebe14c07c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memItemLeft" align="right" valign="top"><a id="a03c6f9caa8b75bdcd0d536141ddd8add"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>MQTTClient_cleanSession</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
- <tr class="separator:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4bbe92af0878c896f94855961e31d1d1"><td class="memItemLeft" align="right" valign="top"><a id="a4bbe92af0878c896f94855961e31d1d1"></a>
- static <a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="separator:a4bbe92af0878c896f94855961e31d1d1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a92e78761bef2163632e18e297bc29be5"><td class="memItemLeft" align="right" valign="top"><a id="a92e78761bef2163632e18e297bc29be5"></a>
- static <a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="separator:a92e78761bef2163632e18e297bc29be5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2eeb63b405d9aed880a79b38addf6df7"><td class="memItemLeft" align="right" valign="top"><a id="a2eeb63b405d9aed880a79b38addf6df7"></a>
- static int </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>
- <tr class="memdesc:a2eeb63b405d9aed880a79b38addf6df7"><td class="mdescLeft"> </td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
- <tr class="separator:a2eeb63b405d9aed880a79b38addf6df7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memItemLeft" align="right" valign="top"><a id="a6a08562ce9b763bf79c71029b94cd9f5"></a>
- static int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6a08562ce9b763bf79c71029b94cd9f5">MQTTClient_disconnect_internal</a> (MQTTClient handle, int timeout)</td></tr>
- <tr class="memdesc:a6a08562ce9b763bf79c71029b94cd9f5"><td class="mdescLeft"> </td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
- <tr class="separator:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a355caa079d8293b37b8e2c9c367e4563"><td class="memItemLeft" align="right" valign="top"><a id="a355caa079d8293b37b8e2c9c367e4563"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>MQTTClient_retry</b> (void)</td></tr>
- <tr class="separator:a355caa079d8293b37b8e2c9c367e4563"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a872934d31b4a5e81ad329496dfcbe629"><td class="memItemLeft" align="right" valign="top"><a id="a872934d31b4a5e81ad329496dfcbe629"></a>
- static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> * </td><td class="memItemRight" valign="bottom"><b>MQTTClient_cycle</b> (SOCKET *sock, ELAPSED_TIME_TYPE timeout, int *rc)</td></tr>
- <tr class="separator:a872934d31b4a5e81ad329496dfcbe629"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a61a15c5181fd620f696fb91d05303cd3"><td class="memItemLeft" align="right" valign="top"><a id="a61a15c5181fd620f696fb91d05303cd3"></a>
- static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> * </td><td class="memItemRight" valign="bottom"><b>MQTTClient_waitfor</b> (MQTTClient handle, int packet_type, int *rc, int64_t timeout)</td></tr>
- <tr class="separator:a61a15c5181fd620f696fb91d05303cd3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#acdcf1aefca1dbb3d1b3d36c9bbaf3760">MQTTProtocol_checkPendingWrites</a> (void)</td></tr>
- <tr class="memdesc:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="mdescLeft"> </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>
- <tr class="separator:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a208d79938a67d7ba66284ad3d2d0819b"><td class="memItemLeft" align="right" valign="top"><a id="a208d79938a67d7ba66284ad3d2d0819b"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>MQTTClient_writeComplete</b> (SOCKET socket, int rc)</td></tr>
- <tr class="separator:a208d79938a67d7ba66284ad3d2d0819b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ade24f717a9b39d38b081e1d5e0db1661"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:ade24f717a9b39d38b081e1d5e0db1661"><td class="mdescLeft"> </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>
- <tr class="separator:ade24f717a9b39d38b081e1d5e0db1661"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="mdescLeft"> </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>
- <tr class="separator:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a> (MQTTClient *handle)</td></tr>
- <tr class="memdesc:ae700c3f5cfea3813264ce95e7c8cf498"><td class="mdescLeft"> </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>
- <tr class="separator:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="memdesc:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="mdescLeft"> </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>
- <tr class="separator:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab217acbfaf47603355ca430983f93095"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095">MQTTClient_free</a> (void *memory)</td></tr>
- <tr class="memdesc:ab217acbfaf47603355ca430983f93095"><td class="mdescLeft"> </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>
- <tr class="separator:ab217acbfaf47603355ca430983f93095"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="memdesc:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="mdescLeft"> </td><td class="mdescRight">Frees the storage associated with the MQTT response. <a href="MQTTClient_8c.html#a01bd2c5f98ec5c0636a106db33f2b01b">More...</a><br /></td></tr>
- <tr class="separator:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adc7d708419664670063a0e7fd9c27bca"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:adc7d708419664670063a0e7fd9c27bca"><td class="mdescLeft"> </td><td class="mdescRight">Sets the MQTTClient_disconnected() callback function for a client. <a href="MQTTClient_8c.html#adc7d708419664670063a0e7fd9c27bca">More...</a><br /></td></tr>
- <tr class="separator:adc7d708419664670063a0e7fd9c27bca"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">call_disconnected</a> (void *context)</td></tr>
- <tr class="memdesc:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper function to call disconnected on a separate thread. <a href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">More...</a><br /></td></tr>
- <tr class="separator:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa594a18474baa9308cb407052d24739d"><td class="memItemLeft" align="right" valign="top"><a id="aa594a18474baa9308cb407052d24739d"></a>
- int </td><td class="memItemRight" valign="bottom"><b>MQTTClient_setPublished</b> (MQTTClient handle, void *context, MQTTClient_published *published)</td></tr>
- <tr class="separator:aa594a18474baa9308cb407052d24739d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aad27d07782991a4937ebf2f39a021f83"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:aad27d07782991a4937ebf2f39a021f83"><td class="mdescLeft"> </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>
- <tr class="separator:aad27d07782991a4937ebf2f39a021f83"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7bf816770b1661fdb62497f44304115e"><td class="memItemLeft" align="right" valign="top"><a id="a7bf816770b1661fdb62497f44304115e"></a>
- void </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>
- <tr class="separator:a7bf816770b1661fdb62497f44304115e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae8220920e5aeccd2bc98fe480793cdae"><td class="memItemLeft" align="right" valign="top"><a id="ae8220920e5aeccd2bc98fe480793cdae"></a>
- void </td><td class="memItemRight" valign="bottom"><b>setRetryLoopInterval</b> (int keepalive)</td></tr>
- <tr class="separator:ae8220920e5aeccd2bc98fe480793cdae"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memItemLeft" align="right" valign="top"><a id="a529ee52c97ce7776a5e5ab429da40b7d"></a>
- <a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="separator:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="mdescLeft"> </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>
- <tr class="separator:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:aa777f80cb3eec5610f976aff30b8c0d6"><td class="mdescLeft"> </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>
- <tr class="separator:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memItemLeft" align="right" valign="top"><a id="a9f7b0789ff9ca9ded72dbad2e747b333"></a>
- void </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>
- <tr class="memdesc:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="mdescLeft"> </td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
- <tr class="separator:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a> (MQTTClient handle, int timeout)</td></tr>
- <tr class="memdesc:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="mdescLeft"> </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>
- <tr class="separator:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1762c469715b7f718c4e63a427e6c13c"><td class="memItemLeft" align="right" valign="top"><a id="a1762c469715b7f718c4e63a427e6c13c"></a>
- int </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>
- <tr class="separator:a1762c469715b7f718c4e63a427e6c13c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">MQTTClient_isConnected</a> (MQTTClient handle)</td></tr>
- <tr class="memdesc:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="mdescLeft"> </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>
- <tr class="separator:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5390c2402f135c12826ffbf6fc261f7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:a5390c2402f135c12826ffbf6fc261f7c"><td class="mdescLeft"> </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>
- <tr class="separator:a5390c2402f135c12826ffbf6fc261f7c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="mdescLeft"> </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>
- <tr class="separator:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af35ab7375435f7b6388c5ff4610dad3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:af35ab7375435f7b6388c5ff4610dad3d"><td class="mdescLeft"> </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>
- <tr class="separator:af35ab7375435f7b6388c5ff4610dad3d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="mdescLeft"> </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>
- <tr class="separator:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:a46bdb532d2153110ccffb2f0748d1ba5"><td class="mdescLeft"> </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>
- <tr class="separator:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a50abbce720d50b9f84b97ff9fa1f546d"><td class="mdescLeft"> </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>
- <tr class="separator:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a58356c13867f18df60fd4c7ec9457c48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:a58356c13867f18df60fd4c7ec9457c48"><td class="mdescLeft"> </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>
- <tr class="separator:a58356c13867f18df60fd4c7ec9457c48"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aa8731be3dbc6a25f41f037f8bbbb054b">MQTTClient_unsubscribe</a> (MQTTClient handle, const char *topic)</td></tr>
- <tr class="memdesc:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="mdescLeft"> </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>
- <tr class="separator:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3c0ca97b393eee10d4f441ba68830e83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:a3c0ca97b393eee10d4f441ba68830e83"><td class="mdescLeft"> </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>
- <tr class="separator:a3c0ca97b393eee10d4f441ba68830e83"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="mdescLeft"> </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>
- <tr class="separator:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae54936bf7680dcde353e6fc785a44461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </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>
- <tr class="memdesc:ae54936bf7680dcde353e6fc785a44461"><td class="mdescLeft"> </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>
- <tr class="separator:ae54936bf7680dcde353e6fc785a44461"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a5e0cfa14237d7557bee2a59747ecadd3"><td class="mdescLeft"> </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>
- <tr class="separator:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4c2df88d00a3dadd510a8cb774739366"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:a4c2df88d00a3dadd510a8cb774739366"><td class="mdescLeft"> </td><td class="mdescRight">This function performs a synchronous receive of incoming messages. <a href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366">More...</a><br /></td></tr>
- <tr class="separator:a4c2df88d00a3dadd510a8cb774739366"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield</a> (void)</td></tr>
- <tr class="memdesc:a8ad3d29864a9ca08202b0832e0f6678e"><td class="mdescLeft"> </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>
- <tr class="separator:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memItemLeft" align="right" valign="top">int </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>
- <tr class="memdesc:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="mdescLeft"> </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>
- <tr class="separator:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2a617c6b0492c04a4ddea592f5e53604"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens</a> (MQTTClient handle, MQTTClient_deliveryToken **tokens)</td></tr>
- <tr class="memdesc:a2a617c6b0492c04a4ddea592f5e53604"><td class="mdescLeft"> </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>
- <tr class="separator:a2a617c6b0492c04a4ddea592f5e53604"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a4dfa35d29db54b10b15b8ac2d9a778be">MQTTClient_setTraceLevel</a> (enum MQTTCLIENT_TRACE_LEVELS level)</td></tr>
- <tr class="memdesc:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="mdescLeft"> </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>
- <tr class="separator:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a22870f94aa4cb1827626612f1ded7c69"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">MQTTClient_setTraceCallback</a> (MQTTClient_traceCallback *callback)</td></tr>
- <tr class="memdesc:a22870f94aa4cb1827626612f1ded7c69"><td class="mdescLeft"> </td><td class="mdescRight">This function sets the trace callback if needed. <a href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">More...</a><br /></td></tr>
- <tr class="separator:a22870f94aa4cb1827626612f1ded7c69"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a96067a2fb74d2a61c7e93015629548e0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a96067a2fb74d2a61c7e93015629548e0">MQTTClient_setCommandTimeout</a> (MQTTClient handle, unsigned long milliSeconds)</td></tr>
- <tr class="memdesc:a96067a2fb74d2a61c7e93015629548e0"><td class="mdescLeft"> </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>
- <tr class="separator:a96067a2fb74d2a61c7e93015629548e0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abe842456c914ce9201d277a972cc085e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">MQTTClient_getVersionInfo</a> (void)</td></tr>
- <tr class="memdesc:abe842456c914ce9201d277a972cc085e"><td class="mdescLeft"> </td><td class="mdescRight">This function returns version information about the library. <a href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">More...</a><br /></td></tr>
- <tr class="separator:abe842456c914ce9201d277a972cc085e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9defda2979f6fedaae64fd85f5c2f617"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9defda2979f6fedaae64fd85f5c2f617">MQTTClient_strerror</a> (int code)</td></tr>
- <tr class="memdesc:a9defda2979f6fedaae64fd85f5c2f617"><td class="mdescLeft"> </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>
- <tr class="separator:a9defda2979f6fedaae64fd85f5c2f617"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:a002f05835324a6cbd270ff94de6be02e"><td class="memItemLeft" align="right" valign="top"><a id="a002f05835324a6cbd270ff94de6be02e"></a>
- const char * </td><td class="memItemRight" valign="bottom"><b>client_timestamp_eye</b> = "MQTTClientV3_Timestamp " BUILD_TIMESTAMP</td></tr>
- <tr class="separator:a002f05835324a6cbd270ff94de6be02e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9e5c55b41667da1b47178c4a0997628c"><td class="memItemLeft" align="right" valign="top"><a id="a9e5c55b41667da1b47178c4a0997628c"></a>
- const char * </td><td class="memItemRight" valign="bottom"><b>client_version_eye</b> = "MQTTClientV3_Version " CLIENT_VERSION</td></tr>
- <tr class="separator:a9e5c55b41667da1b47178c4a0997628c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structClientStates.html">ClientStates</a> </td><td class="memItemRight" valign="bottom"><b>ClientState</b></td></tr>
- <tr class="separator:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2f44b42678b96ba591f6042671e3ba6b"><td class="memItemLeft" align="right" valign="top"><a id="a2f44b42678b96ba591f6042671e3ba6b"></a>
- <a class="el" href="structClientStates.html">ClientStates</a> * </td><td class="memItemRight" valign="bottom"><b>bstate</b> = &ClientState</td></tr>
- <tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memItemLeft" align="right" valign="top"><a id="a2dc95966878cf339e99ab7f7d1f7cc82"></a>
- <a class="el" href="structMQTTProtocol.html">MQTTProtocol</a> </td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
- <tr class="separator:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a238cb4b93c0ffe869accf47116a3e022"><td class="memItemLeft" align="right" valign="top"><a id="a238cb4b93c0ffe869accf47116a3e022"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:a238cb4b93c0ffe869accf47116a3e022"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memItemLeft" align="right" valign="top"><a id="a34d74bdafe1f165a7c7b3f204212b1dd"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex</b> = &mqttclient_mutex_store</td></tr>
- <tr class="separator:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memItemLeft" align="right" valign="top"><a id="a53ea93ecc4a4eef4286f0dfd4be5aafb"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>socket_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2e21c80906915bcadf7b0937235a3416"><td class="memItemLeft" align="right" valign="top"><a id="a2e21c80906915bcadf7b0937235a3416"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>socket_mutex</b> = &socket_mutex_store</td></tr>
- <tr class="separator:a2e21c80906915bcadf7b0937235a3416"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a39d35b6edc70eb0a0878527187188a5d"><td class="memItemLeft" align="right" valign="top"><a id="a39d35b6edc70eb0a0878527187188a5d"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>subscribe_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:a39d35b6edc70eb0a0878527187188a5d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memItemLeft" align="right" valign="top"><a id="a57d1d41fc77b4fd3b35d92998e3caf88"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>subscribe_mutex</b> = &subscribe_mutex_store</td></tr>
- <tr class="separator:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae6d26b53a93f99eeca00177df5ba519b"><td class="memItemLeft" align="right" valign="top"><a id="ae6d26b53a93f99eeca00177df5ba519b"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>unsubscribe_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:ae6d26b53a93f99eeca00177df5ba519b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa6c836b583d21bb5d1950e4654070a5d"><td class="memItemLeft" align="right" valign="top"><a id="aa6c836b583d21bb5d1950e4654070a5d"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>unsubscribe_mutex</b> = &unsubscribe_mutex_store</td></tr>
- <tr class="separator:aa6c836b583d21bb5d1950e4654070a5d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memItemLeft" align="right" valign="top"><a id="a04d2f8260515229acdcc8c6c378bd6f1"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>connect_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aecac74d6e790ccf5af3918553b040bde"><td class="memItemLeft" align="right" valign="top"><a id="aecac74d6e790ccf5af3918553b040bde"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>connect_mutex</b> = &connect_mutex_store</td></tr>
- <tr class="separator:aecac74d6e790ccf5af3918553b040bde"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memItemLeft" align="right" valign="top"><a id="a733a136a6ae351b9c145b3fc5af04aa0"></a>
- static volatile int </td><td class="memItemRight" valign="bottom"><b>library_initialized</b> = 0</td></tr>
- <tr class="separator:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a96317981ac7f003130a55ffda157c4c1"><td class="memItemLeft" align="right" valign="top"><a id="a96317981ac7f003130a55ffda157c4c1"></a>
- static <a class="el" href="structList.html">List</a> * </td><td class="memItemRight" valign="bottom"><b>handles</b> = NULL</td></tr>
- <tr class="separator:a96317981ac7f003130a55ffda157c4c1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memItemLeft" align="right" valign="top"><a id="a2f45113638a0b749a8a205d2cd7fb42b"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>running</b> = 0</td></tr>
- <tr class="separator:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a347200bb2e843926f1be8fb43de273b3"><td class="memItemLeft" align="right" valign="top"><a id="a347200bb2e843926f1be8fb43de273b3"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>tostop</b> = 0</td></tr>
- <tr class="separator:a347200bb2e843926f1be8fb43de273b3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa5badf3940b33aca748205668c626668"><td class="memItemLeft" align="right" valign="top"><a id="aa5badf3940b33aca748205668c626668"></a>
- static thread_id_type </td><td class="memItemRight" valign="bottom"><b>run_id</b> = 0</td></tr>
- <tr class="separator:aa5badf3940b33aca748205668c626668"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a25522fe2dcb57f8f4338355b6b89b671"><td class="memItemLeft" align="right" valign="top"><a id="a25522fe2dcb57f8f4338355b6b89b671"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>retryLoopIntervalms</b> = 5000</td></tr>
- <tr class="separator:a25522fe2dcb57f8f4338355b6b89b671"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Synchronous API implementation. </p>
- </div><h2 class="groupheader">Function Documentation</h2>
- <a id="adbcf69dbaf0a0dcbcc87d23f99e73fca"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#adbcf69dbaf0a0dcbcc87d23f99e73fca">◆ </a></span>call_disconnected()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static thread_return_type WINAPI call_disconnected </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>context</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Wrapper function to call disconnected on a separate thread. </p>
- <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>
- <table class="params">
- <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>
- </div>
- </div>
- <a id="ac35494adea1f11d3480b50b8a7f0c17d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ac35494adea1f11d3480b50b8a7f0c17d">◆ </a></span>clientSockCompare()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static int clientSockCompare </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>a</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>b</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">a</td><td>first integer value </td></tr>
- <tr><td class="paramname">b</td><td>second integer value </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
- </div>
- </div>
- <a id="a0c0d8194bf8a449928881cf83276728e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0c0d8194bf8a449928881cf83276728e">◆ </a></span>connectionLost_call()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static thread_return_type WINAPI connectionLost_call </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>context</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Wrapper function to call connection lost on a separate thread. </p>
- <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>
- <table class="params">
- <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>
- </div>
- </div>
- <a id="aaa8ae61cd65c9dc0846df10122d7bd4e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aaa8ae61cd65c9dc0846df10122d7bd4e">◆ </a></span>MQTTClient_connect()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_connect </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> * </td>
- <td class="paramname"><em>options</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <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 />
- <br />
- <b>1</b>: Connection refused: Unacceptable protocol version<br />
- <b>2</b>: Connection refused: Identifier rejected<br />
- <b>3</b>: Connection refused: Server unavailable<br />
- <b>4</b>: Connection refused: Bad user name or password<br />
- <b>5</b>: Connection refused: Not authorized<br />
- <b>6-255</b>: Reserved for future use<br />
- </dd></dl>
- </div>
- </div>
- <a id="aa777f80cb3eec5610f976aff30b8c0d6"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aa777f80cb3eec5610f976aff30b8c0d6">◆ </a></span>MQTTClient_connect5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_connect5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> * </td>
- <td class="paramname"><em>options</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>connectProperties</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>willProperties</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <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>
- <tr><td class="paramname">connectProperties</td><td>the MQTT 5.0 connect properties to use </td></tr>
- <tr><td class="paramname">willProperties</td><td>the MQTT 5.0 properties to set on the will message </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- </div>
- </div>
- <a id="a9a0518d9ca924d12c1329dbe3de5f2b6"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a9a0518d9ca924d12c1329dbe3de5f2b6">◆ </a></span>MQTTClient_create()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_create </td>
- <td>(</td>
- <td class="paramtype">MQTTClient * </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>serverURI</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>clientId</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>persistence_type</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>persistence_context</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <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 />
- <em>tcp://</em> or <em>mqtt://</em> - Insecure TCP <br />
- <em>ssl://</em> or <em>mqtts://</em> - Encrypted SSL/TLS <br />
- <em>ws://</em> - Insecure websockets <br />
- <em>wss://</em> - Secure web sockets <br />
- 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>
- <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>
- <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br />
- <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 />
- <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 />
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph.png" border="0" usemap="#MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" id="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph">
- <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"/>
- <area shape="rect" href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661" title="A version of :MQTTClient_create() with additional options." alt="" coords="188,5,395,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="443,5,577,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ade24f717a9b39d38b081e1d5e0db1661"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ade24f717a9b39d38b081e1d5e0db1661">◆ </a></span>MQTTClient_createWithOptions()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_createWithOptions </td>
- <td>(</td>
- <td class="paramtype">MQTTClient * </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>serverURI</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>clientId</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>persistence_type</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>persistence_context</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__createOptions.html">MQTTClient_createOptions</a> * </td>
- <td class="paramname"><em>options</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <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>
- <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>
- <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br />
- <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 />
- <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 />
- <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>
- <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>
- <tr><td class="paramname">options</td><td>additional options for the create. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph.png" border="0" usemap="#MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" id="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph">
- <area shape="rect" title="A version of :MQTTClient_create() with additional options." alt="" coords="5,5,212,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ae700c3f5cfea3813264ce95e7c8cf498"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ae700c3f5cfea3813264ce95e7c8cf498">◆ </a></span>MQTTClient_destroy()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_destroy </td>
- <td>(</td>
- <td class="paramtype">MQTTClient * </td>
- <td class="paramname"><em>handle</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <p>It should be called when the client is no longer required. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">handle</td><td>A pointer to the handle referring to the ::MQTTClient structure to be freed. </td></tr>
- </table>
- </dd>
- </dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph.png" border="0" usemap="#MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" id="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph">
- <area shape="rect" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create())." alt="" coords="5,5,147,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="195,5,329,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a1e4d90c13a3c0705bc4a13bfe64e6525"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a1e4d90c13a3c0705bc4a13bfe64e6525">◆ </a></span>MQTTClient_disconnect()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_disconnect </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>timeout</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to disconnect the client from the MQTT server. </p>
- <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>
- <table class="params">
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph.png" border="0" usemap="#MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" id="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph">
- <area shape="rect" title="This function attempts to disconnect the client from the MQTT server." alt="" coords="5,5,168,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="216,5,351,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ab217acbfaf47603355ca430983f93095"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab217acbfaf47603355ca430983f93095">◆ </a></span>MQTTClient_free()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_free </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>ptr</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function frees memory allocated by the MQTT C client library, especially the topic name. </p>
- <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>
- <table class="params">
- <tr><td class="paramname">ptr</td><td>The pointer to the client library storage to be freed. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a2bc00ce11e0cac5dbc0938c512b4ab31"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a2bc00ce11e0cac5dbc0938c512b4ab31">◆ </a></span>MQTTClient_freeMessage()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_freeMessage </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> ** </td>
- <td class="paramname"><em>msg</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload. </p>
- <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>
- <table class="params">
- <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>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a2a617c6b0492c04a4ddea592f5e53604"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a2a617c6b0492c04a4ddea592f5e53604">◆ </a></span>MQTTClient_getPendingDeliveryTokens()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_getPendingDeliveryTokens </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken ** </td>
- <td class="paramname"><em>tokens</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion). </p>
- <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>
- <table class="params">
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph.png" border="0" usemap="#MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" id="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph">
- <area shape="rect" title="This function sets a pointer to an array of delivery tokens for messages that are currently in-flight..." alt="" coords="5,5,216,47"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="264,13,399,39"/>
- </map>
- </div>
- </div>
- </div>
- <a id="abe842456c914ce9201d277a972cc085e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#abe842456c914ce9201d277a972cc085e">◆ </a></span>MQTTClient_getVersionInfo()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a>* MQTTClient_getVersionInfo </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function returns version information about the library. </p>
- <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>
- </div>
- </div>
- <a id="a21804ede1a506d1d69a472bc30acc8ba"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a21804ede1a506d1d69a472bc30acc8ba">◆ </a></span>MQTTClient_global_init()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_global_init </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structMQTTClient__init__options.html">MQTTClient_init_options</a> * </td>
- <td class="paramname"><em>inits</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Global init of mqtt library. </p>
- <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>
- </div>
- </div>
- <a id="a6e8231e8c47f6f67f7ebbb5dcb4c69c0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">◆ </a></span>MQTTClient_isConnected()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_isConnected </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function allows the client application to test whether or not a client is currently connected to the MQTT server. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Boolean true if the client is connected, otherwise false. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph.png" border="0" usemap="#MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" id="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph">
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="224,5,359,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a3cd7a94b48d1d9c6b8af4b9203d69d37"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a3cd7a94b48d1d9c6b8af4b9203d69d37">◆ </a></span>MQTTClient_publish()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_publish </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topicName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>payloadlen</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const void * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>qos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>retained</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken * </td>
- <td class="paramname"><em>dt</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
- <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
- <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
- <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
- <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph.png" border="0" usemap="#MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" id="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="388,5,523,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a3c0ca97b393eee10d4f441ba68830e83"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a3c0ca97b393eee10d4f441ba68830e83">◆ </a></span>MQTTClient_publish5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publish5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topicName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>payloadlen</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const void * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>qos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>retained</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>properties</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken * </td>
- <td class="paramname"><em>dt</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
- <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
- <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
- <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
- <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
- <tr><td class="paramname">properties</td><td>the MQTT 5.0 properties to be used </td></tr>
- <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>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph.png" border="0" usemap="#MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" id="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph">
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="200,5,335,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a5e0cfa14237d7557bee2a59747ecadd3"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a5e0cfa14237d7557bee2a59747ecadd3">◆ </a></span>MQTTClient_publishMessage()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_publishMessage </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topicName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> * </td>
- <td class="paramname"><em>msg</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken * </td>
- <td class="paramname"><em>dt</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph.png" border="0" usemap="#MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" id="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph">
- <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"/>
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="689,5,824,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ae54936bf7680dcde353e6fc785a44461"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ae54936bf7680dcde353e6fc785a44461">◆ </a></span>MQTTClient_publishMessage5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publishMessage5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topicName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> * </td>
- <td class="paramname"><em>msg</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken * </td>
- <td class="paramname"><em>dt</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph.png" border="0" usemap="#MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" id="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="448,5,583,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a4c2df88d00a3dadd510a8cb774739366"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4c2df88d00a3dadd510a8cb774739366">◆ </a></span>MQTTClient_receive()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_receive </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char ** </td>
- <td class="paramname"><em>topicName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int * </td>
- <td class="paramname"><em>topicLen</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> ** </td>
- <td class="paramname"><em>message</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned long </td>
- <td class="paramname"><em>timeout</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function performs a synchronous receive of incoming messages. </p>
- <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>
- <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>
- <table class="params">
- <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>
- <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>
- <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>
- <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>
- <tr><td class="paramname">timeout</td><td>The length of time to wait for a message in milliseconds. </td></tr>
- </table>
- </dd>
- </dl>
- <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>
- </div>
- </div>
- <a id="aad27d07782991a4937ebf2f39a021f83"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aad27d07782991a4937ebf2f39a021f83">◆ </a></span>MQTTClient_setCallbacks()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_setCallbacks </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>context</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_connectionLost * </td>
- <td class="paramname"><em>cl</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_messageArrived * </td>
- <td class="paramname"><em>ma</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryComplete * </td>
- <td class="paramname"><em>dc</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function sets the callback functions for a specific client. </p>
- <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>
- <p><b>Note:</b> The MQTT client must be disconnected when this function is called. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <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>
- <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>
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph.png" border="0" usemap="#MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" id="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph">
- <area shape="rect" title="This function sets the callback functions for a specific client." alt="" coords="5,5,180,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="228,5,363,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a96067a2fb74d2a61c7e93015629548e0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a96067a2fb74d2a61c7e93015629548e0">◆ </a></span>MQTTClient_setCommandTimeout()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_setCommandTimeout </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned long </td>
- <td class="paramname"><em>milliSeconds</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the timeout value for un/subscribe commands when waiting for the un/suback response from the server. </p>
- <p>Values less than 5000 are not allowed. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <tr><td class="paramname">milliSeconds</td><td>the maximum number of milliseconds to wait </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>MQTTCLIENT_SUCCESS or MQTTCLIENT_FAILURE </dd></dl>
- </div>
- </div>
- <a id="adc7d708419664670063a0e7fd9c27bca"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#adc7d708419664670063a0e7fd9c27bca">◆ </a></span>MQTTClient_setDisconnected()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_setDisconnected </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>context</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_disconnected * </td>
- <td class="paramname"><em>co</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the MQTTClient_disconnected() callback function for a client. </p>
- <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>
- <table class="params">
- <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>
- <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>
- <tr><td class="paramname">co</td><td>A pointer to an MQTTClient_disconnected() callback function. NULL removes the callback setting. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph.png" border="0" usemap="#MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" id="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph">
- <area shape="rect" title="Sets the MQTTClient_disconnected() callback function for a client." alt="" coords="5,5,201,32"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="249,5,384,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a22870f94aa4cb1827626612f1ded7c69"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a22870f94aa4cb1827626612f1ded7c69">◆ </a></span>MQTTClient_setTraceCallback()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_setTraceCallback </td>
- <td>(</td>
- <td class="paramtype">MQTTClient_traceCallback * </td>
- <td class="paramname"><em>callback</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function sets the trace callback if needed. </p>
- <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>
- <table class="params">
- <tr><td class="paramname">callback</td><td>a pointer to the function which will handle the trace information </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a4dfa35d29db54b10b15b8ac2d9a778be"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4dfa35d29db54b10b15b8ac2d9a778be">◆ </a></span>MQTTClient_setTraceLevel()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_setTraceLevel </td>
- <td>(</td>
- <td class="paramtype">enum MQTTCLIENT_TRACE_LEVELS </td>
- <td class="paramname"><em>level</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function sets the level of trace information which will be returned in the trace callback. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">level</td><td>the trace level required </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a9defda2979f6fedaae64fd85f5c2f617"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a9defda2979f6fedaae64fd85f5c2f617">◆ </a></span>MQTTClient_strerror()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const char* MQTTClient_strerror </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>code</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Returns a pointer to the string representation of the error or NULL. </p>
- <p>Do not free after use. Returns NULL if the error code is unknown. </p>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph.png" border="0" usemap="#MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" id="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph">
- <area shape="rect" title="Returns a pointer to the string representation of the error or NULL." alt="" coords="5,5,145,32"/>
- <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="193,5,237,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a9c1c28258f0d5c6a44ff53a98618f5f3"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a9c1c28258f0d5c6a44ff53a98618f5f3">◆ </a></span>MQTTClient_subscribe()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_subscribe </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>qos</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to subscribe a client to a single topic, which may contain wildcards (see wildcard). </p>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
- <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph.png" border="0" usemap="#MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" id="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph">
- <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"/>
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="660,5,795,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="af35ab7375435f7b6388c5ff4610dad3d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#af35ab7375435f7b6388c5ff4610dad3d">◆ </a></span>MQTTClient_subscribe5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribe5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>qos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> * </td>
- <td class="paramname"><em>opts</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>props</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain wildcards (see wildcard). </p>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
- <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
- <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
- <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph.png" border="0" usemap="#MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" id="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="457,5,592,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a92fa1c13f3db8399e042fbdbdfb692b3"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a92fa1c13f3db8399e042fbdbdfb692b3">◆ </a></span>MQTTClient_subscribeMany()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_subscribeMany </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>count</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char *const * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int * </td>
- <td class="paramname"><em>qos</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wildcard). </p>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
- <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>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph.png" border="0" usemap="#MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" id="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="481,5,616,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a5390c2402f135c12826ffbf6fc261f7c"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a5390c2402f135c12826ffbf6fc261f7c">◆ </a></span>MQTTClient_subscribeMany5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribeMany5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>count</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char *const * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int * </td>
- <td class="paramname"><em>qos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> * </td>
- <td class="paramname"><em>opts</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>props</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to subscribe an MQTT version 5.0 client to a list of topics, which may contain wildcards (see wildcard). </p>
- <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>
- <table class="params">
- <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>
- <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
- <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>
- <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>
- <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
- <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph.png" border="0" usemap="#MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" id="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph">
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="247,5,381,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="aa8731be3dbc6a25f41f037f8bbbb054b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aa8731be3dbc6a25f41f037f8bbbb054b">◆ </a></span>MQTTClient_unsubscribe()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_unsubscribe </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topic</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to remove an existing subscription made by the specified client. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph.png" border="0" usemap="#MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" id="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph">
- <area shape="rect" title="This function attempts to remove an existing subscription made by the specified client." alt="" coords="5,5,175,32"/>
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="701,5,836,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a58356c13867f18df60fd4c7ec9457c48"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a58356c13867f18df60fd4c7ec9457c48">◆ </a></span>MQTTClient_unsubscribe5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribe5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>props</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to remove an existing subscription made by the specified client using MQTT 5.0. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
- <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph.png" border="0" usemap="#MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" id="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="484,5,619,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a50abbce720d50b9f84b97ff9fa1f546d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a50abbce720d50b9f84b97ff9fa1f546d">◆ </a></span>MQTTClient_unsubscribeMany()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_unsubscribeMany </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>count</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char *const * </td>
- <td class="paramname"><em>topic</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to remove existing subscriptions to a list of topics made by the specified client. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
- <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>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph.png" border="0" usemap="#MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" id="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph">
- <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"/>
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="508,5,643,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a46bdb532d2153110ccffb2f0748d1ba5"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a46bdb532d2153110ccffb2f0748d1ba5">◆ </a></span>MQTTClient_unsubscribeMany5()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribeMany5 </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>count</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char *const * </td>
- <td class="paramname"><em>topic</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> * </td>
- <td class="paramname"><em>props</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function attempts to remove existing subscriptions to a list of topics made by the specified client using MQTT version 5.0. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
- <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>
- <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph.png" border="0" usemap="#MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" id="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph">
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ab8786efdd6c3a50c6ca33cfb5d8fc283"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab8786efdd6c3a50c6ca33cfb5d8fc283">◆ </a></span>MQTTClient_waitForCompletion()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int MQTTClient_waitForCompletion </td>
- <td>(</td>
- <td class="paramtype">MQTTClient </td>
- <td class="paramname"><em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">MQTTClient_deliveryToken </td>
- <td class="paramname"><em>dt</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned long </td>
- <td class="paramname"><em>timeout</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function is called by the client application to synchronize execution of the main thread with completed publication of a message. </p>
- <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>
- <table class="params">
- <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>
- <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>
- <tr><td class="paramname">timeout</td><td>The maximum time to wait in milliseconds. </td></tr>
- </table>
- </dd>
- </dl>
- <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>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph.png" border="0" usemap="#MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" id="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph">
- <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"/>
- <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="260,5,395,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a8ad3d29864a9ca08202b0832e0f6678e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8ad3d29864a9ca08202b0832e0f6678e">◆ </a></span>MQTTClient_yield()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTClient_yield </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings. </p>
- <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>
- </div>
- </div>
- <a id="acdcf1aefca1dbb3d1b3d36c9bbaf3760"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#acdcf1aefca1dbb3d1b3d36c9bbaf3760">◆ </a></span>MQTTProtocol_checkPendingWrites()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void MQTTProtocol_checkPendingWrites </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>See if any pending writes have been completed, and cleanup if so. </p>
- <p>Cleaning up means removing any publication data that was stored because the write did not originally complete. </p>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph.png" border="0" usemap="#MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" alt=""/></div>
- <map name="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" id="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph">
- <area shape="rect" title="See if any pending writes have been completed, and cleanup if so." alt="" coords="5,61,201,102"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="931,17,1049,44"/>
- <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"/>
- <area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="249,93,471,120"/>
- <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"/>
- <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"/>
- <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"/>
- <area shape="rect" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452" title="List callback function for comparing integers." alt="" coords="521,144,608,171"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a01bd2c5f98ec5c0636a106db33f2b01b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a01bd2c5f98ec5c0636a106db33f2b01b">◆ </a></span>MQTTResponse_free()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void MQTTResponse_free </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> </td>
- <td class="paramname"><em>response</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Frees the storage associated with the MQTT response. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">response</td><td>the response structure to be freed </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a id="a7de1b785bccb15bfa46dcf3a6706aad0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a7de1b785bccb15bfa46dcf3a6706aad0">◆ </a></span>ClientState</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structClientStates.html">ClientStates</a> ClientState</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Initial value:</b><div class="fragment"><div class="line">=</div>
- <div class="line">{</div>
- <div class="line"> CLIENT_VERSION, </div>
- <div class="line"> NULL </div>
- <div class="line">}</div>
- </div><!-- fragment -->
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.17
- </small></address>
- </body>
- </html>
|