MQTTProtocolClient_8c.html 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>MQTT C Client Libraries Internals: MQTTProtocolClient.c File Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">MQTT C Client Libraries Internals
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. </div><!-- top -->
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#nested-classes">Data Structures</a> &#124;
  65. <a href="#define-members">Macros</a> &#124;
  66. <a href="#func-members">Functions</a> &#124;
  67. <a href="#var-members">Variables</a> </div>
  68. <div class="headertitle">
  69. <div class="title">MQTTProtocolClient.c File Reference</div> </div>
  70. </div><!--header-->
  71. <div class="contents">
  72. <p>Functions dealing with the MQTT protocol exchanges.
  73. <a href="#details">More...</a></p>
  74. <div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
  75. <code>#include &lt;string.h&gt;</code><br />
  76. <code>#include &lt;stdint.h&gt;</code><br />
  77. <code>#include &quot;MQTTProtocolClient.h&quot;</code><br />
  78. <code>#include &quot;MQTTPersistence.h&quot;</code><br />
  79. <code>#include &quot;Socket.h&quot;</code><br />
  80. <code>#include &quot;SocketBuffer.h&quot;</code><br />
  81. <code>#include &quot;StackTrace.h&quot;</code><br />
  82. <code>#include &quot;Heap.h&quot;</code><br />
  83. </div><div class="textblock"><div class="dynheader">
  84. Include dependency graph for MQTTProtocolClient.c:</div>
  85. <div class="dyncontent">
  86. <div class="center"><img src="MQTTProtocolClient_8c__incl.png" border="0" usemap="#MQTTProtocolClient_8c" alt=""/></div>
  87. <map name="MQTTProtocolClient_8c" id="MQTTProtocolClient_8c">
  88. <area shape="rect" title="Functions dealing with the MQTT protocol exchanges." alt="" coords="49,5,200,32"/>
  89. <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
  90. <area shape="rect" title=" " alt="" coords="93,80,157,107"/>
  91. <area shape="rect" title=" " alt="" coords="181,80,245,107"/>
  92. </map>
  93. </div>
  94. </div><table class="memberdecls">
  95. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  96. Data Structures</h2></td></tr>
  97. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structAckRequest.html">AckRequest</a></td></tr>
  98. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. </table><table class="memberdecls">
  100. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  101. Macros</h2></td></tr>
  102. <tr class="memitem:a2d017cd3beb218080a7988e2deed2a11"><td class="memItemLeft" align="right" valign="top"><a id="a2d017cd3beb218080a7988e2deed2a11"></a>
  103. #define&#160;</td><td class="memItemRight" valign="bottom"><b>min</b>(A, B)&#160;&#160;&#160;( (A) &lt; (B) ? (A):(B))</td></tr>
  104. <tr class="separator:a2d017cd3beb218080a7988e2deed2a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. </table><table class="memberdecls">
  106. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  107. Functions</h2></td></tr>
  108. <tr class="memitem:a0fc0d4eaad01f640c901311421533c3d"><td class="memItemLeft" align="right" valign="top"><a id="a0fc0d4eaad01f640c901311421533c3d"></a>
  109. static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTProtocol_storeQoS0</b> (<a class="el" href="structClients.html">Clients</a> *pubclient, <a class="el" href="structPublish.html">Publish</a> *publish)</td></tr>
  110. <tr class="separator:a0fc0d4eaad01f640c901311421533c3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:a4502a4b9257b32508fac87e42fb1d85a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a4502a4b9257b32508fac87e42fb1d85a">MQTTProtocol_startPublishCommon</a> (<a class="el" href="structClients.html">Clients</a> *pubclient, <a class="el" href="structPublish.html">Publish</a> *publish, int qos, int retained)</td></tr>
  112. <tr class="memdesc:a4502a4b9257b32508fac87e42fb1d85a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function to start a new publish exchange. <a href="MQTTProtocolClient_8c.html#a4502a4b9257b32508fac87e42fb1d85a">More...</a><br /></td></tr>
  113. <tr class="separator:a4502a4b9257b32508fac87e42fb1d85a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:ad2f52c0fff61c891b174d69b95bcd173"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#ad2f52c0fff61c891b174d69b95bcd173">MQTTProtocol_retries</a> (START_TIME_TYPE now, <a class="el" href="structClients.html">Clients</a> *client, int regardless)</td></tr>
  115. <tr class="memdesc:ad2f52c0fff61c891b174d69b95bcd173"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT retry processing per client. <a href="MQTTProtocolClient_8c.html#ad2f52c0fff61c891b174d69b95bcd173">More...</a><br /></td></tr>
  116. <tr class="separator:ad2f52c0fff61c891b174d69b95bcd173"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:a68e5f17517e75326c0869a22c7995358"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a68e5f17517e75326c0869a22c7995358">MQTTProtocol_queueAck</a> (<a class="el" href="structClients.html">Clients</a> *client, int ackType, int msgId)</td></tr>
  118. <tr class="memdesc:a68e5f17517e75326c0869a22c7995358"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue an ack message. <a href="MQTTProtocolClient_8c.html#a68e5f17517e75326c0869a22c7995358">More...</a><br /></td></tr>
  119. <tr class="separator:a68e5f17517e75326c0869a22c7995358"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a286c2ef2904b5eb4a0ffa5b598961c67"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a286c2ef2904b5eb4a0ffa5b598961c67">messageIDCompare</a> (void *a, void *b)</td></tr>
  121. <tr class="memdesc:a286c2ef2904b5eb4a0ffa5b598961c67"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing Message structures by message id. <a href="MQTTProtocolClient_8c.html#a286c2ef2904b5eb4a0ffa5b598961c67">More...</a><br /></td></tr>
  122. <tr class="separator:a286c2ef2904b5eb4a0ffa5b598961c67"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a0fa824f9702cb6b0d7c800fd65198fce"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a0fa824f9702cb6b0d7c800fd65198fce">MQTTProtocol_assignMsgId</a> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
  124. <tr class="memdesc:a0fa824f9702cb6b0d7c800fd65198fce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign a new message id for a client. <a href="MQTTProtocolClient_8c.html#a0fa824f9702cb6b0d7c800fd65198fce">More...</a><br /></td></tr>
  125. <tr class="separator:a0fa824f9702cb6b0d7c800fd65198fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a0f86c2cc2debfa39e275d3c76d5d0073"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a0f86c2cc2debfa39e275d3c76d5d0073">MQTTProtocol_startPublish</a> (<a class="el" href="structClients.html">Clients</a> *pubclient, <a class="el" href="structPublish.html">Publish</a> *publish, int qos, int retained, <a class="el" href="structMessages.html">Messages</a> **mm)</td></tr>
  127. <tr class="memdesc:a0f86c2cc2debfa39e275d3c76d5d0073"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a new publish exchange. <a href="MQTTProtocolClient_8c.html#a0f86c2cc2debfa39e275d3c76d5d0073">More...</a><br /></td></tr>
  128. <tr class="separator:a0f86c2cc2debfa39e275d3c76d5d0073"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:afbf121be11a48fcda3e0d639bc47472b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMessages.html">Messages</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#afbf121be11a48fcda3e0d639bc47472b">MQTTProtocol_createMessage</a> (<a class="el" href="structPublish.html">Publish</a> *publish, <a class="el" href="structMessages.html">Messages</a> **mm, int qos, int retained, int allocatePayload)</td></tr>
  130. <tr class="memdesc:afbf121be11a48fcda3e0d639bc47472b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy and store message data for retries. <a href="MQTTProtocolClient_8c.html#afbf121be11a48fcda3e0d639bc47472b">More...</a><br /></td></tr>
  131. <tr class="separator:afbf121be11a48fcda3e0d639bc47472b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:ac753a3ad12292a0a9c2f4343bd33817e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPublications.html">Publications</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e">MQTTProtocol_storePublication</a> (<a class="el" href="structPublish.html">Publish</a> *publish, int *<a class="el" href="utf-8_8c.html#afed088663f8704004425cdae2120b9b3">len</a>)</td></tr>
  133. <tr class="memdesc:ac753a3ad12292a0a9c2f4343bd33817e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store message data for possible retry. <a href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e">More...</a><br /></td></tr>
  134. <tr class="separator:ac753a3ad12292a0a9c2f4343bd33817e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a900fa28a8774ad6f5535104bb62e7abf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf">MQTTProtocol_removePublication</a> (<a class="el" href="structPublications.html">Publications</a> *p)</td></tr>
  136. <tr class="memdesc:a900fa28a8774ad6f5535104bb62e7abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove stored message data. <a href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf">More...</a><br /></td></tr>
  137. <tr class="separator:a900fa28a8774ad6f5535104bb62e7abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a2d7897d575be486bf1ed0459d7b2b8e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a2d7897d575be486bf1ed0459d7b2b8e7">MQTTProtocol_handlePublishes</a> (void *pack, SOCKET sock)</td></tr>
  139. <tr class="memdesc:a2d7897d575be486bf1ed0459d7b2b8e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming publish packet for a socket The payload field of the packet has not been transferred to another buffer at this point. <a href="MQTTProtocolClient_8c.html#a2d7897d575be486bf1ed0459d7b2b8e7">More...</a><br /></td></tr>
  140. <tr class="separator:a2d7897d575be486bf1ed0459d7b2b8e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:aa9f454819a84c7a43009253fabcea3f3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#aa9f454819a84c7a43009253fabcea3f3">MQTTProtocol_handlePubacks</a> (void *pack, SOCKET sock, <a class="el" href="structPublications.html">Publications</a> **pubToRemove)</td></tr>
  142. <tr class="memdesc:aa9f454819a84c7a43009253fabcea3f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming puback packet for a socket. <a href="MQTTProtocolClient_8c.html#aa9f454819a84c7a43009253fabcea3f3">More...</a><br /></td></tr>
  143. <tr class="separator:aa9f454819a84c7a43009253fabcea3f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:ac09429577a185297d8797d791b7116a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#ac09429577a185297d8797d791b7116a2">MQTTProtocol_handlePubrecs</a> (void *pack, SOCKET sock, <a class="el" href="structPublications.html">Publications</a> **pubToRemove)</td></tr>
  145. <tr class="memdesc:ac09429577a185297d8797d791b7116a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubrec packet for a socket. <a href="MQTTProtocolClient_8c.html#ac09429577a185297d8797d791b7116a2">More...</a><br /></td></tr>
  146. <tr class="separator:ac09429577a185297d8797d791b7116a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:a362e0560d6f4f0e50237664a1a8e89a7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a362e0560d6f4f0e50237664a1a8e89a7">MQTTProtocol_handlePubrels</a> (void *pack, SOCKET sock)</td></tr>
  148. <tr class="memdesc:a362e0560d6f4f0e50237664a1a8e89a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubrel packet for a socket. <a href="MQTTProtocolClient_8c.html#a362e0560d6f4f0e50237664a1a8e89a7">More...</a><br /></td></tr>
  149. <tr class="separator:a362e0560d6f4f0e50237664a1a8e89a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:a9aa163c85710d4936ae368b8b9412440"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a9aa163c85710d4936ae368b8b9412440">MQTTProtocol_handlePubcomps</a> (void *pack, SOCKET sock, <a class="el" href="structPublications.html">Publications</a> **pubToRemove)</td></tr>
  151. <tr class="memdesc:a9aa163c85710d4936ae368b8b9412440"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubcomp packet for a socket. <a href="MQTTProtocolClient_8c.html#a9aa163c85710d4936ae368b8b9412440">More...</a><br /></td></tr>
  152. <tr class="separator:a9aa163c85710d4936ae368b8b9412440"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:a218a69c333badc4a61b321bc830ac1e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a218a69c333badc4a61b321bc830ac1e0">MQTTProtocol_keepalive</a> (START_TIME_TYPE now)</td></tr>
  154. <tr class="memdesc:a218a69c333badc4a61b321bc830ac1e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT protocol keepAlive processing. <a href="MQTTProtocolClient_8c.html#a218a69c333badc4a61b321bc830ac1e0">More...</a><br /></td></tr>
  155. <tr class="separator:a218a69c333badc4a61b321bc830ac1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:a3a1acc3bd7b09ab9d52e15e4a97c4cb2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a3a1acc3bd7b09ab9d52e15e4a97c4cb2">MQTTProtocol_retry</a> (START_TIME_TYPE now, int doRetry, int regardless)</td></tr>
  157. <tr class="memdesc:a3a1acc3bd7b09ab9d52e15e4a97c4cb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT retry protocol and socket pending writes processing. <a href="MQTTProtocolClient_8c.html#a3a1acc3bd7b09ab9d52e15e4a97c4cb2">More...</a><br /></td></tr>
  158. <tr class="separator:a3a1acc3bd7b09ab9d52e15e4a97c4cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <tr class="memitem:a52e062f52e5a42275471eeb23040fc0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a52e062f52e5a42275471eeb23040fc0e">MQTTProtocol_freeClient</a> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
  160. <tr class="memdesc:a52e062f52e5a42275471eeb23040fc0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a client structure. <a href="MQTTProtocolClient_8c.html#a52e062f52e5a42275471eeb23040fc0e">More...</a><br /></td></tr>
  161. <tr class="separator:a52e062f52e5a42275471eeb23040fc0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. <tr class="memitem:ab9c5a22f0cbd4fa648663de7ae7118ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#ab9c5a22f0cbd4fa648663de7ae7118ab">MQTTProtocol_emptyMessageList</a> (<a class="el" href="structList.html">List</a> *msgList)</td></tr>
  163. <tr class="memdesc:ab9c5a22f0cbd4fa648663de7ae7118ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty a message list, leaving it able to accept new messages. <a href="MQTTProtocolClient_8c.html#ab9c5a22f0cbd4fa648663de7ae7118ab">More...</a><br /></td></tr>
  164. <tr class="separator:ab9c5a22f0cbd4fa648663de7ae7118ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
  165. <tr class="memitem:a8514ddc8d0f346c0da19ab4d59b4062f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a8514ddc8d0f346c0da19ab4d59b4062f">MQTTProtocol_freeMessageList</a> (<a class="el" href="structList.html">List</a> *msgList)</td></tr>
  166. <tr class="memdesc:a8514ddc8d0f346c0da19ab4d59b4062f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty and free up all storage used by a message list. <a href="MQTTProtocolClient_8c.html#a8514ddc8d0f346c0da19ab4d59b4062f">More...</a><br /></td></tr>
  167. <tr class="separator:a8514ddc8d0f346c0da19ab4d59b4062f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a5906689ff10dc091d1a2b317295d39b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a5906689ff10dc091d1a2b317295d39b0">MQTTProtocol_writeAvailable</a> (SOCKET socket)</td></tr>
  169. <tr class="memdesc:a5906689ff10dc091d1a2b317295d39b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback that is invoked when the socket is available for writing. <a href="MQTTProtocolClient_8c.html#a5906689ff10dc091d1a2b317295d39b0">More...</a><br /></td></tr>
  170. <tr class="separator:a5906689ff10dc091d1a2b317295d39b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  171. <tr class="memitem:a447b65c664ebedef8fecb70e29dc1767"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a447b65c664ebedef8fecb70e29dc1767">MQTTStrncpy</a> (char *dest, const char *src, size_t dest_size)</td></tr>
  172. <tr class="memdesc:a447b65c664ebedef8fecb70e29dc1767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy no more than dest_size -1 characters from the string pointed to by src to the array pointed to by dest. <a href="MQTTProtocolClient_8c.html#a447b65c664ebedef8fecb70e29dc1767">More...</a><br /></td></tr>
  173. <tr class="separator:a447b65c664ebedef8fecb70e29dc1767"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. <tr class="memitem:a89588f085edc5cee4eb650e8ad114df4"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a89588f085edc5cee4eb650e8ad114df4">MQTTStrdup</a> (const char *src)</td></tr>
  175. <tr class="memdesc:a89588f085edc5cee4eb650e8ad114df4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Duplicate a string, safely, allocating space on the heap. <a href="MQTTProtocolClient_8c.html#a89588f085edc5cee4eb650e8ad114df4">More...</a><br /></td></tr>
  176. <tr class="separator:a89588f085edc5cee4eb650e8ad114df4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  177. </table><table class="memberdecls">
  178. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  179. Variables</h2></td></tr>
  180. <tr class="memitem:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memItemLeft" align="right" valign="top"><a id="a2dc95966878cf339e99ab7f7d1f7cc82"></a>
  181. <a class="el" href="structMQTTProtocol.html">MQTTProtocol</a>&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
  182. <tr class="separator:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  183. <tr class="memitem:a2f44b42678b96ba591f6042671e3ba6b"><td class="memItemLeft" align="right" valign="top"><a id="a2f44b42678b96ba591f6042671e3ba6b"></a>
  184. <a class="el" href="structClientStates.html">ClientStates</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>bstate</b></td></tr>
  185. <tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  186. </table>
  187. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  188. <div class="textblock"><p>Functions dealing with the MQTT protocol exchanges. </p>
  189. <p>Some other related functions are in the MQTTProtocolOut module </p>
  190. </div><h2 class="groupheader">Function Documentation</h2>
  191. <a id="a286c2ef2904b5eb4a0ffa5b598961c67"></a>
  192. <h2 class="memtitle"><span class="permalink"><a href="#a286c2ef2904b5eb4a0ffa5b598961c67">&#9670;&nbsp;</a></span>messageIDCompare()</h2>
  193. <div class="memitem">
  194. <div class="memproto">
  195. <table class="memname">
  196. <tr>
  197. <td class="memname">int messageIDCompare </td>
  198. <td>(</td>
  199. <td class="paramtype">void *&#160;</td>
  200. <td class="paramname"><em>a</em>, </td>
  201. </tr>
  202. <tr>
  203. <td class="paramkey"></td>
  204. <td></td>
  205. <td class="paramtype">void *&#160;</td>
  206. <td class="paramname"><em>b</em>&#160;</td>
  207. </tr>
  208. <tr>
  209. <td></td>
  210. <td>)</td>
  211. <td></td><td></td>
  212. </tr>
  213. </table>
  214. </div><div class="memdoc">
  215. <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing Message structures by message id. </p>
  216. <dl class="params"><dt>Parameters</dt><dd>
  217. <table class="params">
  218. <tr><td class="paramname">a</td><td>first integer value </td></tr>
  219. <tr><td class="paramname">b</td><td>second integer value </td></tr>
  220. </table>
  221. </dd>
  222. </dl>
  223. <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
  224. </div>
  225. </div>
  226. <a id="a0fa824f9702cb6b0d7c800fd65198fce"></a>
  227. <h2 class="memtitle"><span class="permalink"><a href="#a0fa824f9702cb6b0d7c800fd65198fce">&#9670;&nbsp;</a></span>MQTTProtocol_assignMsgId()</h2>
  228. <div class="memitem">
  229. <div class="memproto">
  230. <table class="memname">
  231. <tr>
  232. <td class="memname">int MQTTProtocol_assignMsgId </td>
  233. <td>(</td>
  234. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  235. <td class="paramname"><em>client</em></td><td>)</td>
  236. <td></td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <p>Assign a new message id for a client. </p>
  241. <p>Make sure it isn't already being used and does not exceed the maximum. </p><dl class="params"><dt>Parameters</dt><dd>
  242. <table class="params">
  243. <tr><td class="paramname">client</td><td>a client structure </td></tr>
  244. </table>
  245. </dd>
  246. </dl>
  247. <dl class="section return"><dt>Returns</dt><dd>the next message id to use, or 0 if none available </dd></dl>
  248. <div class="dynheader">
  249. Here is the call graph for this function:</div>
  250. <div class="dyncontent">
  251. <div class="center"><img src="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph" alt=""/></div>
  252. <map name="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph" id="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph">
  253. <area shape="rect" title="Assign a new message id for a client." alt="" coords="5,31,193,57"/>
  254. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="264,5,359,32"/>
  255. <area shape="rect" href="MQTTProtocolClient_8c.html#a286c2ef2904b5eb4a0ffa5b598961c67" title="List callback function for comparing Message structures by message id." alt="" coords="241,56,381,83"/>
  256. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="429,5,548,32"/>
  257. </map>
  258. </div>
  259. </div>
  260. </div>
  261. <a id="afbf121be11a48fcda3e0d639bc47472b"></a>
  262. <h2 class="memtitle"><span class="permalink"><a href="#afbf121be11a48fcda3e0d639bc47472b">&#9670;&nbsp;</a></span>MQTTProtocol_createMessage()</h2>
  263. <div class="memitem">
  264. <div class="memproto">
  265. <table class="memname">
  266. <tr>
  267. <td class="memname"><a class="el" href="structMessages.html">Messages</a>* MQTTProtocol_createMessage </td>
  268. <td>(</td>
  269. <td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
  270. <td class="paramname"><em>publish</em>, </td>
  271. </tr>
  272. <tr>
  273. <td class="paramkey"></td>
  274. <td></td>
  275. <td class="paramtype"><a class="el" href="structMessages.html">Messages</a> **&#160;</td>
  276. <td class="paramname"><em>mm</em>, </td>
  277. </tr>
  278. <tr>
  279. <td class="paramkey"></td>
  280. <td></td>
  281. <td class="paramtype">int&#160;</td>
  282. <td class="paramname"><em>qos</em>, </td>
  283. </tr>
  284. <tr>
  285. <td class="paramkey"></td>
  286. <td></td>
  287. <td class="paramtype">int&#160;</td>
  288. <td class="paramname"><em>retained</em>, </td>
  289. </tr>
  290. <tr>
  291. <td class="paramkey"></td>
  292. <td></td>
  293. <td class="paramtype">int&#160;</td>
  294. <td class="paramname"><em>allocatePayload</em>&#160;</td>
  295. </tr>
  296. <tr>
  297. <td></td>
  298. <td>)</td>
  299. <td></td><td></td>
  300. </tr>
  301. </table>
  302. </div><div class="memdoc">
  303. <p>Copy and store message data for retries. </p>
  304. <dl class="params"><dt>Parameters</dt><dd>
  305. <table class="params">
  306. <tr><td class="paramname">publish</td><td>the publication data </td></tr>
  307. <tr><td class="paramname">mm</td><td>- pointer to the message data to store </td></tr>
  308. <tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
  309. <tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
  310. <tr><td class="paramname">allocatePayload</td><td>boolean - whether or not to malloc payload </td></tr>
  311. </table>
  312. </dd>
  313. </dl>
  314. <dl class="section return"><dt>Returns</dt><dd>pointer to the message data stored </dd></dl>
  315. <div class="dynheader">
  316. Here is the call graph for this function:</div>
  317. <div class="dyncontent">
  318. <div class="center"><img src="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph" alt=""/></div>
  319. <map name="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph" id="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph">
  320. <area shape="rect" title="Copy and store message data for retries." alt="" coords="5,5,208,32"/>
  321. <area shape="rect" href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e" title="Store message data for possible retry." alt="" coords="256,5,463,32"/>
  322. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="511,5,599,32"/>
  323. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="647,5,789,32"/>
  324. </map>
  325. </div>
  326. </div>
  327. </div>
  328. <a id="ab9c5a22f0cbd4fa648663de7ae7118ab"></a>
  329. <h2 class="memtitle"><span class="permalink"><a href="#ab9c5a22f0cbd4fa648663de7ae7118ab">&#9670;&nbsp;</a></span>MQTTProtocol_emptyMessageList()</h2>
  330. <div class="memitem">
  331. <div class="memproto">
  332. <table class="memname">
  333. <tr>
  334. <td class="memname">void MQTTProtocol_emptyMessageList </td>
  335. <td>(</td>
  336. <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
  337. <td class="paramname"><em>msgList</em></td><td>)</td>
  338. <td></td>
  339. </tr>
  340. </table>
  341. </div><div class="memdoc">
  342. <p>Empty a message list, leaving it able to accept new messages. </p>
  343. <dl class="params"><dt>Parameters</dt><dd>
  344. <table class="params">
  345. <tr><td class="paramname">msgList</td><td>the message list to empty </td></tr>
  346. </table>
  347. </dd>
  348. </dl>
  349. <div class="dynheader">
  350. Here is the call graph for this function:</div>
  351. <div class="dyncontent">
  352. <div class="center"><img src="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph" alt=""/></div>
  353. <map name="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph" id="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph">
  354. <area shape="rect" title="Empty a message list, leaving it able to accept new messages." alt="" coords="5,56,229,83"/>
  355. <area shape="rect" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2" title="Removes and frees all items in a list, leaving the list ready for new items." alt="" coords="348,5,428,32"/>
  356. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="959,81,1077,108"/>
  357. <area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="277,107,499,133"/>
  358. <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="547,107,639,133"/>
  359. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="687,107,768,133"/>
  360. <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="816,107,911,133"/>
  361. </map>
  362. </div>
  363. </div>
  364. </div>
  365. <a id="a52e062f52e5a42275471eeb23040fc0e"></a>
  366. <h2 class="memtitle"><span class="permalink"><a href="#a52e062f52e5a42275471eeb23040fc0e">&#9670;&nbsp;</a></span>MQTTProtocol_freeClient()</h2>
  367. <div class="memitem">
  368. <div class="memproto">
  369. <table class="memname">
  370. <tr>
  371. <td class="memname">void MQTTProtocol_freeClient </td>
  372. <td>(</td>
  373. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  374. <td class="paramname"><em>client</em></td><td>)</td>
  375. <td></td>
  376. </tr>
  377. </table>
  378. </div><div class="memdoc">
  379. <p>Free a client structure. </p>
  380. <dl class="params"><dt>Parameters</dt><dd>
  381. <table class="params">
  382. <tr><td class="paramname">client</td><td>the client data to free </td></tr>
  383. </table>
  384. </dd>
  385. </dl>
  386. <div class="dynheader">
  387. Here is the call graph for this function:</div>
  388. <div class="dyncontent">
  389. <div class="center"><img src="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph" alt=""/></div>
  390. <map name="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph" id="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph">
  391. <area shape="rect" title="Free a client structure." alt="" coords="5,31,175,57"/>
  392. <area shape="rect" href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192" title="Removes and frees all items in a list, and frees the list itself." alt="" coords="558,5,629,32"/>
  393. <area shape="rect" href="MQTTProtocolClient_8c.html#a8514ddc8d0f346c0da19ab4d59b4062f" title="Empty and free up all storage used by a message list." alt="" coords="223,56,433,83"/>
  394. <area shape="rect" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2" title="Removes and frees all items in a list, leaving the list ready for new items." alt="" coords="824,5,904,32"/>
  395. <area shape="rect" href="MQTTProtocolClient_8c.html#ab9c5a22f0cbd4fa648663de7ae7118ab" title="Empty a message list, leaving it able to accept new messages." alt="" coords="481,56,705,83"/>
  396. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="1435,81,1553,108"/>
  397. <area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="753,107,975,133"/>
  398. <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="1023,107,1115,133"/>
  399. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="1163,107,1244,133"/>
  400. <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="1292,107,1387,133"/>
  401. </map>
  402. </div>
  403. </div>
  404. </div>
  405. <a id="a8514ddc8d0f346c0da19ab4d59b4062f"></a>
  406. <h2 class="memtitle"><span class="permalink"><a href="#a8514ddc8d0f346c0da19ab4d59b4062f">&#9670;&nbsp;</a></span>MQTTProtocol_freeMessageList()</h2>
  407. <div class="memitem">
  408. <div class="memproto">
  409. <table class="memname">
  410. <tr>
  411. <td class="memname">void MQTTProtocol_freeMessageList </td>
  412. <td>(</td>
  413. <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
  414. <td class="paramname"><em>msgList</em></td><td>)</td>
  415. <td></td>
  416. </tr>
  417. </table>
  418. </div><div class="memdoc">
  419. <p>Empty and free up all storage used by a message list. </p>
  420. <dl class="params"><dt>Parameters</dt><dd>
  421. <table class="params">
  422. <tr><td class="paramname">msgList</td><td>the message list to empty and free </td></tr>
  423. </table>
  424. </dd>
  425. </dl>
  426. <div class="dynheader">
  427. Here is the call graph for this function:</div>
  428. <div class="dyncontent">
  429. <div class="center"><img src="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph" alt=""/></div>
  430. <map name="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph" id="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph">
  431. <area shape="rect" title="Empty and free up all storage used by a message list." alt="" coords="5,31,216,57"/>
  432. <area shape="rect" href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192" title="Removes and frees all items in a list, and frees the list itself." alt="" coords="341,5,411,32"/>
  433. <area shape="rect" href="MQTTProtocolClient_8c.html#ab9c5a22f0cbd4fa648663de7ae7118ab" title="Empty a message list, leaving it able to accept new messages." alt="" coords="264,56,488,83"/>
  434. <area shape="rect" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2" title="Removes and frees all items in a list, leaving the list ready for new items." alt="" coords="607,5,687,32"/>
  435. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="1217,81,1336,108"/>
  436. <area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="536,107,757,133"/>
  437. <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="805,107,897,133"/>
  438. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="945,107,1027,133"/>
  439. <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="1075,107,1169,133"/>
  440. </map>
  441. </div>
  442. </div>
  443. </div>
  444. <a id="aa9f454819a84c7a43009253fabcea3f3"></a>
  445. <h2 class="memtitle"><span class="permalink"><a href="#aa9f454819a84c7a43009253fabcea3f3">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubacks()</h2>
  446. <div class="memitem">
  447. <div class="memproto">
  448. <table class="memname">
  449. <tr>
  450. <td class="memname">int MQTTProtocol_handlePubacks </td>
  451. <td>(</td>
  452. <td class="paramtype">void *&#160;</td>
  453. <td class="paramname"><em>pack</em>, </td>
  454. </tr>
  455. <tr>
  456. <td class="paramkey"></td>
  457. <td></td>
  458. <td class="paramtype">SOCKET&#160;</td>
  459. <td class="paramname"><em>sock</em>, </td>
  460. </tr>
  461. <tr>
  462. <td class="paramkey"></td>
  463. <td></td>
  464. <td class="paramtype"><a class="el" href="structPublications.html">Publications</a> **&#160;</td>
  465. <td class="paramname"><em>pubToRemove</em>&#160;</td>
  466. </tr>
  467. <tr>
  468. <td></td>
  469. <td>)</td>
  470. <td></td><td></td>
  471. </tr>
  472. </table>
  473. </div><div class="memdoc">
  474. <p>Process an incoming puback packet for a socket. </p>
  475. <dl class="params"><dt>Parameters</dt><dd>
  476. <table class="params">
  477. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  478. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  479. </table>
  480. </dd>
  481. </dl>
  482. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  483. <div class="dynheader">
  484. Here is the call graph for this function:</div>
  485. <div class="dyncontent">
  486. <div class="center"><img src="MQTTProtocolClient_8c_aa9f454819a84c7a43009253fabcea3f3_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_aa9f454819a84c7a43009253fabcea3f3_cgraph" alt=""/></div>
  487. <map name="MQTTProtocolClient_8c_aa9f454819a84c7a43009253fabcea3f3_cgraph" id="MQTTProtocolClient_8c_aa9f454819a84c7a43009253fabcea3f3_cgraph">
  488. <area shape="rect" title="Process an incoming puback packet for a socket." alt="" coords="5,5,208,32"/>
  489. <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="256,5,351,32"/>
  490. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="399,5,517,32"/>
  491. </map>
  492. </div>
  493. </div>
  494. </div>
  495. <a id="a9aa163c85710d4936ae368b8b9412440"></a>
  496. <h2 class="memtitle"><span class="permalink"><a href="#a9aa163c85710d4936ae368b8b9412440">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubcomps()</h2>
  497. <div class="memitem">
  498. <div class="memproto">
  499. <table class="memname">
  500. <tr>
  501. <td class="memname">int MQTTProtocol_handlePubcomps </td>
  502. <td>(</td>
  503. <td class="paramtype">void *&#160;</td>
  504. <td class="paramname"><em>pack</em>, </td>
  505. </tr>
  506. <tr>
  507. <td class="paramkey"></td>
  508. <td></td>
  509. <td class="paramtype">SOCKET&#160;</td>
  510. <td class="paramname"><em>sock</em>, </td>
  511. </tr>
  512. <tr>
  513. <td class="paramkey"></td>
  514. <td></td>
  515. <td class="paramtype"><a class="el" href="structPublications.html">Publications</a> **&#160;</td>
  516. <td class="paramname"><em>pubToRemove</em>&#160;</td>
  517. </tr>
  518. <tr>
  519. <td></td>
  520. <td>)</td>
  521. <td></td><td></td>
  522. </tr>
  523. </table>
  524. </div><div class="memdoc">
  525. <p>Process an incoming pubcomp packet for a socket. </p>
  526. <dl class="params"><dt>Parameters</dt><dd>
  527. <table class="params">
  528. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  529. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  530. </table>
  531. </dd>
  532. </dl>
  533. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  534. <div class="dynheader">
  535. Here is the call graph for this function:</div>
  536. <div class="dyncontent">
  537. <div class="center"><img src="MQTTProtocolClient_8c_a9aa163c85710d4936ae368b8b9412440_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a9aa163c85710d4936ae368b8b9412440_cgraph" alt=""/></div>
  538. <map name="MQTTProtocolClient_8c_a9aa163c85710d4936ae368b8b9412440_cgraph" id="MQTTProtocolClient_8c_a9aa163c85710d4936ae368b8b9412440_cgraph">
  539. <area shape="rect" title="Process an incoming pubcomp packet for a socket." alt="" coords="5,5,220,32"/>
  540. <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="268,5,363,32"/>
  541. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="411,5,529,32"/>
  542. </map>
  543. </div>
  544. </div>
  545. </div>
  546. <a id="a2d7897d575be486bf1ed0459d7b2b8e7"></a>
  547. <h2 class="memtitle"><span class="permalink"><a href="#a2d7897d575be486bf1ed0459d7b2b8e7">&#9670;&nbsp;</a></span>MQTTProtocol_handlePublishes()</h2>
  548. <div class="memitem">
  549. <div class="memproto">
  550. <table class="memname">
  551. <tr>
  552. <td class="memname">int MQTTProtocol_handlePublishes </td>
  553. <td>(</td>
  554. <td class="paramtype">void *&#160;</td>
  555. <td class="paramname"><em>pack</em>, </td>
  556. </tr>
  557. <tr>
  558. <td class="paramkey"></td>
  559. <td></td>
  560. <td class="paramtype">SOCKET&#160;</td>
  561. <td class="paramname"><em>sock</em>&#160;</td>
  562. </tr>
  563. <tr>
  564. <td></td>
  565. <td>)</td>
  566. <td></td><td></td>
  567. </tr>
  568. </table>
  569. </div><div class="memdoc">
  570. <p>Process an incoming publish packet for a socket The payload field of the packet has not been transferred to another buffer at this point. </p>
  571. <p>If it's needed beyond the scope of this function, it has to be copied. </p><dl class="params"><dt>Parameters</dt><dd>
  572. <table class="params">
  573. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  574. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  575. </table>
  576. </dd>
  577. </dl>
  578. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  579. <div class="dynheader">
  580. Here is the call graph for this function:</div>
  581. <div class="dyncontent">
  582. <div class="center"><img src="MQTTProtocolClient_8c_a2d7897d575be486bf1ed0459d7b2b8e7_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a2d7897d575be486bf1ed0459d7b2b8e7_cgraph" alt=""/></div>
  583. <map name="MQTTProtocolClient_8c_a2d7897d575be486bf1ed0459d7b2b8e7_cgraph" id="MQTTProtocolClient_8c_a2d7897d575be486bf1ed0459d7b2b8e7_cgraph">
  584. <area shape="rect" title="Process an incoming publish packet for a socket The payload field of the packet has not been transfer..." alt="" coords="5,5,215,32"/>
  585. <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="263,5,357,32"/>
  586. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="405,5,524,32"/>
  587. </map>
  588. </div>
  589. </div>
  590. </div>
  591. <a id="ac09429577a185297d8797d791b7116a2"></a>
  592. <h2 class="memtitle"><span class="permalink"><a href="#ac09429577a185297d8797d791b7116a2">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubrecs()</h2>
  593. <div class="memitem">
  594. <div class="memproto">
  595. <table class="memname">
  596. <tr>
  597. <td class="memname">int MQTTProtocol_handlePubrecs </td>
  598. <td>(</td>
  599. <td class="paramtype">void *&#160;</td>
  600. <td class="paramname"><em>pack</em>, </td>
  601. </tr>
  602. <tr>
  603. <td class="paramkey"></td>
  604. <td></td>
  605. <td class="paramtype">SOCKET&#160;</td>
  606. <td class="paramname"><em>sock</em>, </td>
  607. </tr>
  608. <tr>
  609. <td class="paramkey"></td>
  610. <td></td>
  611. <td class="paramtype"><a class="el" href="structPublications.html">Publications</a> **&#160;</td>
  612. <td class="paramname"><em>pubToRemove</em>&#160;</td>
  613. </tr>
  614. <tr>
  615. <td></td>
  616. <td>)</td>
  617. <td></td><td></td>
  618. </tr>
  619. </table>
  620. </div><div class="memdoc">
  621. <p>Process an incoming pubrec packet for a socket. </p>
  622. <dl class="params"><dt>Parameters</dt><dd>
  623. <table class="params">
  624. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  625. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  626. </table>
  627. </dd>
  628. </dl>
  629. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  630. <div class="dynheader">
  631. Here is the call graph for this function:</div>
  632. <div class="dyncontent">
  633. <div class="center"><img src="MQTTProtocolClient_8c_ac09429577a185297d8797d791b7116a2_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ac09429577a185297d8797d791b7116a2_cgraph" alt=""/></div>
  634. <map name="MQTTProtocolClient_8c_ac09429577a185297d8797d791b7116a2_cgraph" id="MQTTProtocolClient_8c_ac09429577a185297d8797d791b7116a2_cgraph">
  635. <area shape="rect" title="Process an incoming pubrec packet for a socket." alt="" coords="5,5,205,32"/>
  636. <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="253,5,348,32"/>
  637. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="396,5,515,32"/>
  638. </map>
  639. </div>
  640. </div>
  641. </div>
  642. <a id="a362e0560d6f4f0e50237664a1a8e89a7"></a>
  643. <h2 class="memtitle"><span class="permalink"><a href="#a362e0560d6f4f0e50237664a1a8e89a7">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubrels()</h2>
  644. <div class="memitem">
  645. <div class="memproto">
  646. <table class="memname">
  647. <tr>
  648. <td class="memname">int MQTTProtocol_handlePubrels </td>
  649. <td>(</td>
  650. <td class="paramtype">void *&#160;</td>
  651. <td class="paramname"><em>pack</em>, </td>
  652. </tr>
  653. <tr>
  654. <td class="paramkey"></td>
  655. <td></td>
  656. <td class="paramtype">SOCKET&#160;</td>
  657. <td class="paramname"><em>sock</em>&#160;</td>
  658. </tr>
  659. <tr>
  660. <td></td>
  661. <td>)</td>
  662. <td></td><td></td>
  663. </tr>
  664. </table>
  665. </div><div class="memdoc">
  666. <p>Process an incoming pubrel packet for a socket. </p>
  667. <dl class="params"><dt>Parameters</dt><dd>
  668. <table class="params">
  669. <tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
  670. <tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
  671. </table>
  672. </dd>
  673. </dl>
  674. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  675. <div class="dynheader">
  676. Here is the call graph for this function:</div>
  677. <div class="dyncontent">
  678. <div class="center"><img src="MQTTProtocolClient_8c_a362e0560d6f4f0e50237664a1a8e89a7_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a362e0560d6f4f0e50237664a1a8e89a7_cgraph" alt=""/></div>
  679. <map name="MQTTProtocolClient_8c_a362e0560d6f4f0e50237664a1a8e89a7_cgraph" id="MQTTProtocolClient_8c_a362e0560d6f4f0e50237664a1a8e89a7_cgraph">
  680. <area shape="rect" title="Process an incoming pubrel packet for a socket." alt="" coords="5,5,201,32"/>
  681. <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="249,5,344,32"/>
  682. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="392,5,511,32"/>
  683. </map>
  684. </div>
  685. </div>
  686. </div>
  687. <a id="a218a69c333badc4a61b321bc830ac1e0"></a>
  688. <h2 class="memtitle"><span class="permalink"><a href="#a218a69c333badc4a61b321bc830ac1e0">&#9670;&nbsp;</a></span>MQTTProtocol_keepalive()</h2>
  689. <div class="memitem">
  690. <div class="memproto">
  691. <table class="memname">
  692. <tr>
  693. <td class="memname">void MQTTProtocol_keepalive </td>
  694. <td>(</td>
  695. <td class="paramtype">START_TIME_TYPE&#160;</td>
  696. <td class="paramname"><em>now</em></td><td>)</td>
  697. <td></td>
  698. </tr>
  699. </table>
  700. </div><div class="memdoc">
  701. <p>MQTT protocol keepAlive processing. </p>
  702. <p>Sends PINGREQ packets as required. </p><dl class="params"><dt>Parameters</dt><dd>
  703. <table class="params">
  704. <tr><td class="paramname">now</td><td>current time </td></tr>
  705. </table>
  706. </dd>
  707. </dl>
  708. <div class="dynheader">
  709. Here is the call graph for this function:</div>
  710. <div class="dyncontent">
  711. <div class="center"><img src="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph" alt=""/></div>
  712. <map name="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph" id="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph">
  713. <area shape="rect" title="MQTT protocol keepAlive processing." alt="" coords="5,5,175,32"/>
  714. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="223,5,341,32"/>
  715. </map>
  716. </div>
  717. </div>
  718. </div>
  719. <a id="a68e5f17517e75326c0869a22c7995358"></a>
  720. <h2 class="memtitle"><span class="permalink"><a href="#a68e5f17517e75326c0869a22c7995358">&#9670;&nbsp;</a></span>MQTTProtocol_queueAck()</h2>
  721. <div class="memitem">
  722. <div class="memproto">
  723. <table class="mlabels">
  724. <tr>
  725. <td class="mlabels-left">
  726. <table class="memname">
  727. <tr>
  728. <td class="memname">int MQTTProtocol_queueAck </td>
  729. <td>(</td>
  730. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  731. <td class="paramname"><em>client</em>, </td>
  732. </tr>
  733. <tr>
  734. <td class="paramkey"></td>
  735. <td></td>
  736. <td class="paramtype">int&#160;</td>
  737. <td class="paramname"><em>ackType</em>, </td>
  738. </tr>
  739. <tr>
  740. <td class="paramkey"></td>
  741. <td></td>
  742. <td class="paramtype">int&#160;</td>
  743. <td class="paramname"><em>msgId</em>&#160;</td>
  744. </tr>
  745. <tr>
  746. <td></td>
  747. <td>)</td>
  748. <td></td><td></td>
  749. </tr>
  750. </table>
  751. </td>
  752. <td class="mlabels-right">
  753. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  754. </tr>
  755. </table>
  756. </div><div class="memdoc">
  757. <p>Queue an ack message. </p>
  758. <p>This is used when the socket is full (e.g. SSL_ERROR_WANT_WRITE). To be completed/cleared when the socket is no longer full </p><dl class="params"><dt>Parameters</dt><dd>
  759. <table class="params">
  760. <tr><td class="paramname">client</td><td>the client that received the published message </td></tr>
  761. <tr><td class="paramname">ackType</td><td>the type of ack to send </td></tr>
  762. <tr><td class="paramname">msgId</td><td>the msg id of the message we are acknowledging </td></tr>
  763. </table>
  764. </dd>
  765. </dl>
  766. <dl class="section return"><dt>Returns</dt><dd>the completion code </dd></dl>
  767. <div class="dynheader">
  768. Here is the call graph for this function:</div>
  769. <div class="dyncontent">
  770. <div class="center"><img src="MQTTProtocolClient_8c_a68e5f17517e75326c0869a22c7995358_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a68e5f17517e75326c0869a22c7995358_cgraph" alt=""/></div>
  771. <map name="MQTTProtocolClient_8c_a68e5f17517e75326c0869a22c7995358_cgraph" id="MQTTProtocolClient_8c_a68e5f17517e75326c0869a22c7995358_cgraph">
  772. <area shape="rect" title="Queue an ack message." alt="" coords="5,5,177,32"/>
  773. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="225,5,313,32"/>
  774. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="361,5,504,32"/>
  775. </map>
  776. </div>
  777. </div>
  778. </div>
  779. <a id="a900fa28a8774ad6f5535104bb62e7abf"></a>
  780. <h2 class="memtitle"><span class="permalink"><a href="#a900fa28a8774ad6f5535104bb62e7abf">&#9670;&nbsp;</a></span>MQTTProtocol_removePublication()</h2>
  781. <div class="memitem">
  782. <div class="memproto">
  783. <table class="memname">
  784. <tr>
  785. <td class="memname">void MQTTProtocol_removePublication </td>
  786. <td>(</td>
  787. <td class="paramtype"><a class="el" href="structPublications.html">Publications</a> *&#160;</td>
  788. <td class="paramname"><em>p</em></td><td>)</td>
  789. <td></td>
  790. </tr>
  791. </table>
  792. </div><div class="memdoc">
  793. <p>Remove stored message data. </p>
  794. <p>Opposite of storePublication </p><dl class="params"><dt>Parameters</dt><dd>
  795. <table class="params">
  796. <tr><td class="paramname">p</td><td>stored publication to remove </td></tr>
  797. </table>
  798. </dd>
  799. </dl>
  800. <div class="dynheader">
  801. Here is the call graph for this function:</div>
  802. <div class="dyncontent">
  803. <div class="center"><img src="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph" alt=""/></div>
  804. <map name="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph" id="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph">
  805. <area shape="rect" title="Remove stored message data." alt="" coords="5,5,227,32"/>
  806. <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="275,5,367,32"/>
  807. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="415,5,496,32"/>
  808. <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="544,5,639,32"/>
  809. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="687,5,805,32"/>
  810. </map>
  811. </div>
  812. </div>
  813. </div>
  814. <a id="ad2f52c0fff61c891b174d69b95bcd173"></a>
  815. <h2 class="memtitle"><span class="permalink"><a href="#ad2f52c0fff61c891b174d69b95bcd173">&#9670;&nbsp;</a></span>MQTTProtocol_retries()</h2>
  816. <div class="memitem">
  817. <div class="memproto">
  818. <table class="mlabels">
  819. <tr>
  820. <td class="mlabels-left">
  821. <table class="memname">
  822. <tr>
  823. <td class="memname">static void MQTTProtocol_retries </td>
  824. <td>(</td>
  825. <td class="paramtype">START_TIME_TYPE&#160;</td>
  826. <td class="paramname"><em>now</em>, </td>
  827. </tr>
  828. <tr>
  829. <td class="paramkey"></td>
  830. <td></td>
  831. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  832. <td class="paramname"><em>client</em>, </td>
  833. </tr>
  834. <tr>
  835. <td class="paramkey"></td>
  836. <td></td>
  837. <td class="paramtype">int&#160;</td>
  838. <td class="paramname"><em>regardless</em>&#160;</td>
  839. </tr>
  840. <tr>
  841. <td></td>
  842. <td>)</td>
  843. <td></td><td></td>
  844. </tr>
  845. </table>
  846. </td>
  847. <td class="mlabels-right">
  848. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  849. </tr>
  850. </table>
  851. </div><div class="memdoc">
  852. <p>MQTT retry processing per client. </p>
  853. <dl class="params"><dt>Parameters</dt><dd>
  854. <table class="params">
  855. <tr><td class="paramname">now</td><td>current time </td></tr>
  856. <tr><td class="paramname">client</td><td>- the client to which to apply the retry processing </td></tr>
  857. <tr><td class="paramname">regardless</td><td>boolean - retry packets regardless of retry interval (used on reconnect) </td></tr>
  858. </table>
  859. </dd>
  860. </dl>
  861. <div class="dynheader">
  862. Here is the call graph for this function:</div>
  863. <div class="dyncontent">
  864. <div class="center"><img src="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph" alt=""/></div>
  865. <map name="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph" id="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph">
  866. <area shape="rect" title="MQTT retry processing per client." alt="" coords="5,5,156,32"/>
  867. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="563,31,681,57"/>
  868. <area shape="rect" href="Socket_8c.html#a457d9a6a9d8e886c46fcd0c096f45614" title="Indicate whether any data is pending outbound for a socket." alt="" coords="204,31,372,57"/>
  869. <area shape="rect" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452" title="List callback function for comparing integers." alt="" coords="424,31,511,57"/>
  870. <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="420,81,515,108"/>
  871. </map>
  872. </div>
  873. </div>
  874. </div>
  875. <a id="a3a1acc3bd7b09ab9d52e15e4a97c4cb2"></a>
  876. <h2 class="memtitle"><span class="permalink"><a href="#a3a1acc3bd7b09ab9d52e15e4a97c4cb2">&#9670;&nbsp;</a></span>MQTTProtocol_retry()</h2>
  877. <div class="memitem">
  878. <div class="memproto">
  879. <table class="memname">
  880. <tr>
  881. <td class="memname">void MQTTProtocol_retry </td>
  882. <td>(</td>
  883. <td class="paramtype">START_TIME_TYPE&#160;</td>
  884. <td class="paramname"><em>now</em>, </td>
  885. </tr>
  886. <tr>
  887. <td class="paramkey"></td>
  888. <td></td>
  889. <td class="paramtype">int&#160;</td>
  890. <td class="paramname"><em>doRetry</em>, </td>
  891. </tr>
  892. <tr>
  893. <td class="paramkey"></td>
  894. <td></td>
  895. <td class="paramtype">int&#160;</td>
  896. <td class="paramname"><em>regardless</em>&#160;</td>
  897. </tr>
  898. <tr>
  899. <td></td>
  900. <td>)</td>
  901. <td></td><td></td>
  902. </tr>
  903. </table>
  904. </div><div class="memdoc">
  905. <p>MQTT retry protocol and socket pending writes processing. </p>
  906. <dl class="params"><dt>Parameters</dt><dd>
  907. <table class="params">
  908. <tr><td class="paramname">now</td><td>current time </td></tr>
  909. <tr><td class="paramname">doRetry</td><td>boolean - retries as well as pending writes? </td></tr>
  910. <tr><td class="paramname">regardless</td><td>boolean - retry packets regardless of retry interval (used on reconnect) </td></tr>
  911. </table>
  912. </dd>
  913. </dl>
  914. <div class="dynheader">
  915. Here is the call graph for this function:</div>
  916. <div class="dyncontent">
  917. <div class="center"><img src="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph" alt=""/></div>
  918. <map name="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph" id="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph">
  919. <area shape="rect" title="MQTT retry protocol and socket pending writes processing." alt="" coords="5,5,144,32"/>
  920. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="192,5,311,32"/>
  921. </map>
  922. </div>
  923. </div>
  924. </div>
  925. <a id="a0f86c2cc2debfa39e275d3c76d5d0073"></a>
  926. <h2 class="memtitle"><span class="permalink"><a href="#a0f86c2cc2debfa39e275d3c76d5d0073">&#9670;&nbsp;</a></span>MQTTProtocol_startPublish()</h2>
  927. <div class="memitem">
  928. <div class="memproto">
  929. <table class="memname">
  930. <tr>
  931. <td class="memname">int MQTTProtocol_startPublish </td>
  932. <td>(</td>
  933. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  934. <td class="paramname"><em>pubclient</em>, </td>
  935. </tr>
  936. <tr>
  937. <td class="paramkey"></td>
  938. <td></td>
  939. <td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
  940. <td class="paramname"><em>publish</em>, </td>
  941. </tr>
  942. <tr>
  943. <td class="paramkey"></td>
  944. <td></td>
  945. <td class="paramtype">int&#160;</td>
  946. <td class="paramname"><em>qos</em>, </td>
  947. </tr>
  948. <tr>
  949. <td class="paramkey"></td>
  950. <td></td>
  951. <td class="paramtype">int&#160;</td>
  952. <td class="paramname"><em>retained</em>, </td>
  953. </tr>
  954. <tr>
  955. <td class="paramkey"></td>
  956. <td></td>
  957. <td class="paramtype"><a class="el" href="structMessages.html">Messages</a> **&#160;</td>
  958. <td class="paramname"><em>mm</em>&#160;</td>
  959. </tr>
  960. <tr>
  961. <td></td>
  962. <td>)</td>
  963. <td></td><td></td>
  964. </tr>
  965. </table>
  966. </div><div class="memdoc">
  967. <p>Start a new publish exchange. </p>
  968. <p>Store any state necessary and try to send the packet </p><dl class="params"><dt>Parameters</dt><dd>
  969. <table class="params">
  970. <tr><td class="paramname">pubclient</td><td>the client to send the publication to </td></tr>
  971. <tr><td class="paramname">publish</td><td>the publication data </td></tr>
  972. <tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
  973. <tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
  974. <tr><td class="paramname">mm</td><td>- pointer to the message to send </td></tr>
  975. </table>
  976. </dd>
  977. </dl>
  978. <dl class="section return"><dt>Returns</dt><dd>the completion code </dd></dl>
  979. <div class="dynheader">
  980. Here is the call graph for this function:</div>
  981. <div class="dyncontent">
  982. <div class="center"><img src="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph" alt=""/></div>
  983. <map name="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph" id="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph">
  984. <area shape="rect" title="Start a new publish exchange." alt="" coords="5,52,188,79"/>
  985. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="769,5,857,32"/>
  986. <area shape="rect" href="MQTTProtocolClient_8c.html#afbf121be11a48fcda3e0d639bc47472b" title="Copy and store message data for retries." alt="" coords="236,52,439,79"/>
  987. <area shape="rect" href="MQTTProtocolClient_8c.html#a4502a4b9257b32508fac87e42fb1d85a" title="Utility function to start a new publish exchange." alt="" coords="246,103,429,145"/>
  988. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="958,5,1101,32"/>
  989. <area shape="rect" href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e" title="Store message data for possible retry." alt="" coords="487,52,693,79"/>
  990. <area shape="rect" href="MQTTPacket_8c.html#a9ebcf93ff2ba3bd103f016c975e9c9c4" title="Send an MQTT PUBLISH packet down a socket." alt="" coords="499,111,681,137"/>
  991. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="791,60,835,87"/>
  992. <area shape="rect" href="MQTTPacket_8c.html#a3635fd8035177b20c478daea6bad9328" title="Sends an MQTT packet from multiple buffers in one system call write." alt="" coords="741,111,884,137"/>
  993. <area shape="rect" href="MQTTPacket_8c.html#a07aa0146eda3d32979142e7df8ad5fc3" title="Writes an integer as 2 bytes to an output buffer." alt="" coords="780,161,845,188"/>
  994. <area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="955,60,1104,87"/>
  995. <area shape="rect" href="MQTTPersistence_8c.html#a18eab666c3e6aecd92a6c8f10df808e3" title="Adds a record to the persistent store." alt="" coords="932,111,1127,137"/>
  996. <area shape="rect" href="MQTTPacket_8c.html#a132d2d5b304d37cd2348a973f7b315de" title="Calculates an integer from two bytes read from the input buffer." alt="" coords="998,161,1061,188"/>
  997. </map>
  998. </div>
  999. </div>
  1000. </div>
  1001. <a id="a4502a4b9257b32508fac87e42fb1d85a"></a>
  1002. <h2 class="memtitle"><span class="permalink"><a href="#a4502a4b9257b32508fac87e42fb1d85a">&#9670;&nbsp;</a></span>MQTTProtocol_startPublishCommon()</h2>
  1003. <div class="memitem">
  1004. <div class="memproto">
  1005. <table class="mlabels">
  1006. <tr>
  1007. <td class="mlabels-left">
  1008. <table class="memname">
  1009. <tr>
  1010. <td class="memname">static int MQTTProtocol_startPublishCommon </td>
  1011. <td>(</td>
  1012. <td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
  1013. <td class="paramname"><em>pubclient</em>, </td>
  1014. </tr>
  1015. <tr>
  1016. <td class="paramkey"></td>
  1017. <td></td>
  1018. <td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
  1019. <td class="paramname"><em>publish</em>, </td>
  1020. </tr>
  1021. <tr>
  1022. <td class="paramkey"></td>
  1023. <td></td>
  1024. <td class="paramtype">int&#160;</td>
  1025. <td class="paramname"><em>qos</em>, </td>
  1026. </tr>
  1027. <tr>
  1028. <td class="paramkey"></td>
  1029. <td></td>
  1030. <td class="paramtype">int&#160;</td>
  1031. <td class="paramname"><em>retained</em>&#160;</td>
  1032. </tr>
  1033. <tr>
  1034. <td></td>
  1035. <td>)</td>
  1036. <td></td><td></td>
  1037. </tr>
  1038. </table>
  1039. </td>
  1040. <td class="mlabels-right">
  1041. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  1042. </tr>
  1043. </table>
  1044. </div><div class="memdoc">
  1045. <p>Utility function to start a new publish exchange. </p>
  1046. <dl class="params"><dt>Parameters</dt><dd>
  1047. <table class="params">
  1048. <tr><td class="paramname">pubclient</td><td>the client to send the publication to </td></tr>
  1049. <tr><td class="paramname">publish</td><td>the publication data </td></tr>
  1050. <tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
  1051. <tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
  1052. </table>
  1053. </dd>
  1054. </dl>
  1055. <dl class="section return"><dt>Returns</dt><dd>the completion code </dd></dl>
  1056. <div class="dynheader">
  1057. Here is the call graph for this function:</div>
  1058. <div class="dyncontent">
  1059. <div class="center"><img src="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph" alt=""/></div>
  1060. <map name="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph" id="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph">
  1061. <area shape="rect" title="Utility function to start a new publish exchange." alt="" coords="5,49,188,90"/>
  1062. <area shape="rect" href="MQTTPacket_8c.html#a9ebcf93ff2ba3bd103f016c975e9c9c4" title="Send an MQTT PUBLISH packet down a socket." alt="" coords="236,56,419,83"/>
  1063. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="516,5,560,32"/>
  1064. <area shape="rect" href="MQTTPacket_8c.html#a3635fd8035177b20c478daea6bad9328" title="Sends an MQTT packet from multiple buffers in one system call write." alt="" coords="467,56,609,83"/>
  1065. <area shape="rect" href="MQTTPacket_8c.html#a07aa0146eda3d32979142e7df8ad5fc3" title="Writes an integer as 2 bytes to an output buffer." alt="" coords="505,107,571,133"/>
  1066. <area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="680,5,829,32"/>
  1067. <area shape="rect" href="MQTTPersistence_8c.html#a18eab666c3e6aecd92a6c8f10df808e3" title="Adds a record to the persistent store." alt="" coords="657,56,852,83"/>
  1068. <area shape="rect" href="MQTTPacket_8c.html#a132d2d5b304d37cd2348a973f7b315de" title="Calculates an integer from two bytes read from the input buffer." alt="" coords="723,107,786,133"/>
  1069. </map>
  1070. </div>
  1071. </div>
  1072. </div>
  1073. <a id="ac753a3ad12292a0a9c2f4343bd33817e"></a>
  1074. <h2 class="memtitle"><span class="permalink"><a href="#ac753a3ad12292a0a9c2f4343bd33817e">&#9670;&nbsp;</a></span>MQTTProtocol_storePublication()</h2>
  1075. <div class="memitem">
  1076. <div class="memproto">
  1077. <table class="memname">
  1078. <tr>
  1079. <td class="memname"><a class="el" href="structPublications.html">Publications</a>* MQTTProtocol_storePublication </td>
  1080. <td>(</td>
  1081. <td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
  1082. <td class="paramname"><em>publish</em>, </td>
  1083. </tr>
  1084. <tr>
  1085. <td class="paramkey"></td>
  1086. <td></td>
  1087. <td class="paramtype">int *&#160;</td>
  1088. <td class="paramname"><em>len</em>&#160;</td>
  1089. </tr>
  1090. <tr>
  1091. <td></td>
  1092. <td>)</td>
  1093. <td></td><td></td>
  1094. </tr>
  1095. </table>
  1096. </div><div class="memdoc">
  1097. <p>Store message data for possible retry. </p>
  1098. <dl class="params"><dt>Parameters</dt><dd>
  1099. <table class="params">
  1100. <tr><td class="paramname">publish</td><td>the publication data </td></tr>
  1101. <tr><td class="paramname">len</td><td>returned length of the data stored </td></tr>
  1102. </table>
  1103. </dd>
  1104. </dl>
  1105. <dl class="section return"><dt>Returns</dt><dd>the publication stored </dd></dl>
  1106. <div class="dynheader">
  1107. Here is the call graph for this function:</div>
  1108. <div class="dyncontent">
  1109. <div class="center"><img src="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph" alt=""/></div>
  1110. <map name="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph" id="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph">
  1111. <area shape="rect" title="Store message data for possible retry." alt="" coords="5,5,212,32"/>
  1112. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="260,5,348,32"/>
  1113. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="396,5,539,32"/>
  1114. </map>
  1115. </div>
  1116. </div>
  1117. </div>
  1118. <a id="a5906689ff10dc091d1a2b317295d39b0"></a>
  1119. <h2 class="memtitle"><span class="permalink"><a href="#a5906689ff10dc091d1a2b317295d39b0">&#9670;&nbsp;</a></span>MQTTProtocol_writeAvailable()</h2>
  1120. <div class="memitem">
  1121. <div class="memproto">
  1122. <table class="memname">
  1123. <tr>
  1124. <td class="memname">void MQTTProtocol_writeAvailable </td>
  1125. <td>(</td>
  1126. <td class="paramtype">SOCKET&#160;</td>
  1127. <td class="paramname"><em>socket</em></td><td>)</td>
  1128. <td></td>
  1129. </tr>
  1130. </table>
  1131. </div><div class="memdoc">
  1132. <p>Callback that is invoked when the socket is available for writing. </p>
  1133. <p>This is the last attempt made to acknowledge a message. Failures that occur here are ignored. </p><dl class="params"><dt>Parameters</dt><dd>
  1134. <table class="params">
  1135. <tr><td class="paramname">socket</td><td>the socket that is available for writing </td></tr>
  1136. </table>
  1137. </dd>
  1138. </dl>
  1139. <div class="dynheader">
  1140. Here is the call graph for this function:</div>
  1141. <div class="dyncontent">
  1142. <div class="center"><img src="MQTTProtocolClient_8c_a5906689ff10dc091d1a2b317295d39b0_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a5906689ff10dc091d1a2b317295d39b0_cgraph" alt=""/></div>
  1143. <map name="MQTTProtocolClient_8c_a5906689ff10dc091d1a2b317295d39b0_cgraph" id="MQTTProtocolClient_8c_a5906689ff10dc091d1a2b317295d39b0_cgraph">
  1144. <area shape="rect" title="Callback that is invoked when the socket is available for writing." alt="" coords="5,5,200,32"/>
  1145. <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="248,5,343,32"/>
  1146. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="391,5,509,32"/>
  1147. </map>
  1148. </div>
  1149. </div>
  1150. </div>
  1151. <a id="a89588f085edc5cee4eb650e8ad114df4"></a>
  1152. <h2 class="memtitle"><span class="permalink"><a href="#a89588f085edc5cee4eb650e8ad114df4">&#9670;&nbsp;</a></span>MQTTStrdup()</h2>
  1153. <div class="memitem">
  1154. <div class="memproto">
  1155. <table class="memname">
  1156. <tr>
  1157. <td class="memname">char* MQTTStrdup </td>
  1158. <td>(</td>
  1159. <td class="paramtype">const char *&#160;</td>
  1160. <td class="paramname"><em>src</em></td><td>)</td>
  1161. <td></td>
  1162. </tr>
  1163. </table>
  1164. </div><div class="memdoc">
  1165. <p>Duplicate a string, safely, allocating space on the heap. </p>
  1166. <dl class="params"><dt>Parameters</dt><dd>
  1167. <table class="params">
  1168. <tr><td class="paramname">src</td><td>the source string which characters copy from </td></tr>
  1169. </table>
  1170. </dd>
  1171. </dl>
  1172. <dl class="section return"><dt>Returns</dt><dd>the duplicated, allocated string </dd></dl>
  1173. <div class="dynheader">
  1174. Here is the call graph for this function:</div>
  1175. <div class="dyncontent">
  1176. <div class="center"><img src="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph" alt=""/></div>
  1177. <map name="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph" id="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph">
  1178. <area shape="rect" title="Duplicate a string, safely, allocating space on the heap." alt="" coords="5,5,103,32"/>
  1179. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="301,5,345,32"/>
  1180. <area shape="rect" href="MQTTProtocolClient_8c.html#a447b65c664ebedef8fecb70e29dc1767" title="Copy no more than dest_size &#45;1 characters from the string pointed to by src to the array pointed to b..." alt="" coords="151,31,253,57"/>
  1181. </map>
  1182. </div>
  1183. </div>
  1184. </div>
  1185. <a id="a447b65c664ebedef8fecb70e29dc1767"></a>
  1186. <h2 class="memtitle"><span class="permalink"><a href="#a447b65c664ebedef8fecb70e29dc1767">&#9670;&nbsp;</a></span>MQTTStrncpy()</h2>
  1187. <div class="memitem">
  1188. <div class="memproto">
  1189. <table class="memname">
  1190. <tr>
  1191. <td class="memname">char* MQTTStrncpy </td>
  1192. <td>(</td>
  1193. <td class="paramtype">char *&#160;</td>
  1194. <td class="paramname"><em>dest</em>, </td>
  1195. </tr>
  1196. <tr>
  1197. <td class="paramkey"></td>
  1198. <td></td>
  1199. <td class="paramtype">const char *&#160;</td>
  1200. <td class="paramname"><em>src</em>, </td>
  1201. </tr>
  1202. <tr>
  1203. <td class="paramkey"></td>
  1204. <td></td>
  1205. <td class="paramtype">size_t&#160;</td>
  1206. <td class="paramname"><em>dest_size</em>&#160;</td>
  1207. </tr>
  1208. <tr>
  1209. <td></td>
  1210. <td>)</td>
  1211. <td></td><td></td>
  1212. </tr>
  1213. </table>
  1214. </div><div class="memdoc">
  1215. <p>Copy no more than dest_size -1 characters from the string pointed to by src to the array pointed to by dest. </p>
  1216. <p>The destination string will always be null-terminated. </p><dl class="params"><dt>Parameters</dt><dd>
  1217. <table class="params">
  1218. <tr><td class="paramname">dest</td><td>the array which characters copy to </td></tr>
  1219. <tr><td class="paramname">src</td><td>the source string which characters copy from </td></tr>
  1220. <tr><td class="paramname">dest_size</td><td>the size of the memory pointed to by dest: copy no more than this -1 (allow for null). Must be &gt;= 1 </td></tr>
  1221. </table>
  1222. </dd>
  1223. </dl>
  1224. <dl class="section return"><dt>Returns</dt><dd>the destination string pointer </dd></dl>
  1225. <div class="dynheader">
  1226. Here is the call graph for this function:</div>
  1227. <div class="dyncontent">
  1228. <div class="center"><img src="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph" alt=""/></div>
  1229. <map name="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph" id="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph">
  1230. <area shape="rect" title="Copy no more than dest_size &#45;1 characters from the string pointed to by src to the array pointed to b..." alt="" coords="5,5,108,32"/>
  1231. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="156,5,200,32"/>
  1232. </map>
  1233. </div>
  1234. </div>
  1235. </div>
  1236. </div><!-- contents -->
  1237. <!-- start footer part -->
  1238. <hr class="footer"/><address class="footer"><small>
  1239. Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
  1240. <img class="footer" src="doxygen.png" alt="doxygen"/>
  1241. </a> 1.8.17
  1242. </small></address>
  1243. </body>
  1244. </html>