1
0
mirror of https://github.com/eclipse/paho.mqtt.c.git synced 2025-06-02 19:03:10 +08:00
paho.mqtt.c/docs/MQTTClient_internal/html/MQTTProtocolClient_8c.html
2020-11-21 00:20:18 +00:00

1184 lines
70 KiB
HTML

<!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: MQTTProtocolClient.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&amp;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&amp;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="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">MQTTProtocolClient.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Functions dealing with the MQTT protocol exchanges.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &quot;MQTTProtocolClient.h&quot;</code><br />
<code>#include &quot;MQTTPersistence.h&quot;</code><br />
<code>#include &quot;SocketBuffer.h&quot;</code><br />
<code>#include &quot;StackTrace.h&quot;</code><br />
<code>#include &quot;Heap.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for MQTTProtocolClient.c:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c__incl.png" border="0" usemap="#MQTTProtocolClient_8c" alt=""/></div>
<map name="MQTTProtocolClient_8c" id="MQTTProtocolClient_8c">
<area shape="rect" title="Functions dealing with the MQTT protocol exchanges." alt="" coords="49,5,200,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,245,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2d017cd3beb218080a7988e2deed2a11"><td class="memItemLeft" align="right" valign="top"><a id="a2d017cd3beb218080a7988e2deed2a11"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>min</b>(A, B)&#160;&#160;&#160;( (A) &lt; (B) ? (A):(B))</td></tr>
<tr class="separator:a2d017cd3beb218080a7988e2deed2a11"><td class="memSeparator" colspan="2">&#160;</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:a0fc0d4eaad01f640c901311421533c3d"><td class="memItemLeft" align="right" valign="top"><a id="a0fc0d4eaad01f640c901311421533c3d"></a>
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>
<tr class="separator:a0fc0d4eaad01f640c901311421533c3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a4502a4b9257b32508fac87e42fb1d85a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ad2f52c0fff61c891b174d69b95bcd173"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a286c2ef2904b5eb4a0ffa5b598961c67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a0fa824f9702cb6b0d7c800fd65198fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a0f86c2cc2debfa39e275d3c76d5d0073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:afbf121be11a48fcda3e0d639bc47472b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ac753a3ad12292a0a9c2f4343bd33817e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a900fa28a8774ad6f5535104bb62e7abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5311f51f14364c3fdd3798c5a662ae4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#ac5311f51f14364c3fdd3798c5a662ae4">MQTTProtocol_handlePublishes</a> (void *pack, int sock)</td></tr>
<tr class="memdesc:ac5311f51f14364c3fdd3798c5a662ae4"><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#ac5311f51f14364c3fdd3798c5a662ae4">More...</a><br /></td></tr>
<tr class="separator:ac5311f51f14364c3fdd3798c5a662ae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30c60f9b4ddc352fb24345d3453aa7f0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a30c60f9b4ddc352fb24345d3453aa7f0">MQTTProtocol_handlePubacks</a> (void *pack, int sock)</td></tr>
<tr class="memdesc:a30c60f9b4ddc352fb24345d3453aa7f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming puback packet for a socket. <a href="MQTTProtocolClient_8c.html#a30c60f9b4ddc352fb24345d3453aa7f0">More...</a><br /></td></tr>
<tr class="separator:a30c60f9b4ddc352fb24345d3453aa7f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ae7eec0137c440b015425e28a515c78"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a1ae7eec0137c440b015425e28a515c78">MQTTProtocol_handlePubrecs</a> (void *pack, int sock)</td></tr>
<tr class="memdesc:a1ae7eec0137c440b015425e28a515c78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubrec packet for a socket. <a href="MQTTProtocolClient_8c.html#a1ae7eec0137c440b015425e28a515c78">More...</a><br /></td></tr>
<tr class="separator:a1ae7eec0137c440b015425e28a515c78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09fb9a1dce174d6ecd61b8bc5e15b21f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#a09fb9a1dce174d6ecd61b8bc5e15b21f">MQTTProtocol_handlePubrels</a> (void *pack, int sock)</td></tr>
<tr class="memdesc:a09fb9a1dce174d6ecd61b8bc5e15b21f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubrel packet for a socket. <a href="MQTTProtocolClient_8c.html#a09fb9a1dce174d6ecd61b8bc5e15b21f">More...</a><br /></td></tr>
<tr class="separator:a09fb9a1dce174d6ecd61b8bc5e15b21f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafbc4b72c8d17fe9d8a09cfd467e1990"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTProtocolClient_8c.html#aafbc4b72c8d17fe9d8a09cfd467e1990">MQTTProtocol_handlePubcomps</a> (void *pack, int sock)</td></tr>
<tr class="memdesc:aafbc4b72c8d17fe9d8a09cfd467e1990"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process an incoming pubcomp packet for a socket. <a href="MQTTProtocolClient_8c.html#aafbc4b72c8d17fe9d8a09cfd467e1990">More...</a><br /></td></tr>
<tr class="separator:aafbc4b72c8d17fe9d8a09cfd467e1990"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a218a69c333badc4a61b321bc830ac1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a3a1acc3bd7b09ab9d52e15e4a97c4cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a52e062f52e5a42275471eeb23040fc0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ab9c5a22f0cbd4fa648663de7ae7118ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a8514ddc8d0f346c0da19ab4d59b4062f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a447b65c664ebedef8fecb70e29dc1767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a89588f085edc5cee4eb650e8ad114df4"><td class="memSeparator" colspan="2">&#160;</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:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memItemLeft" align="right" valign="top"><a id="a2dc95966878cf339e99ab7f7d1f7cc82"></a>
<a class="el" href="structMQTTProtocol.html">MQTTProtocol</a>&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
<tr class="separator:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memSeparator" colspan="2">&#160;</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> *&#160;</td><td class="memItemRight" valign="bottom"><b>bstate</b></td></tr>
<tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions dealing with the MQTT protocol exchanges. </p>
<p>Some other related functions are in the MQTTProtocolOut module </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a286c2ef2904b5eb4a0ffa5b598961c67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a286c2ef2904b5eb4a0ffa5b598961c67">&#9670;&nbsp;</a></span>messageIDCompare()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int messageIDCompare </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></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 Message structures by message id. </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="a0fa824f9702cb6b0d7c800fd65198fce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fa824f9702cb6b0d7c800fd65198fce">&#9670;&nbsp;</a></span>MQTTProtocol_assignMsgId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_assignMsgId </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assign a new message id for a client. </p>
<p>Make sure it isn't already being used and does not exceed the maximum. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>a client structure </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the next message id to use, or 0 if none available </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph" id="MQTTProtocolClient_8c_a0fa824f9702cb6b0d7c800fd65198fce_cgraph">
<area shape="rect" title="Assign a new message id for a client." alt="" coords="5,31,193,57"/>
<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"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="429,5,548,32"/>
</map>
</div>
</div>
</div>
<a id="afbf121be11a48fcda3e0d639bc47472b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbf121be11a48fcda3e0d639bc47472b">&#9670;&nbsp;</a></span>MQTTProtocol_createMessage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structMessages.html">Messages</a>* MQTTProtocol_createMessage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
<td class="paramname"><em>publish</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structMessages.html">Messages</a> **&#160;</td>
<td class="paramname"><em>mm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>qos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>retained</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>allocatePayload</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy and store message data for retries. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">publish</td><td>the publication data </td></tr>
<tr><td class="paramname">mm</td><td>- pointer to the message data to store </td></tr>
<tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
<tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
<tr><td class="paramname">allocatePayload</td><td>boolean - whether or not to malloc payload </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the message data stored </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph" id="MQTTProtocolClient_8c_afbf121be11a48fcda3e0d639bc47472b_cgraph">
<area shape="rect" title="Copy and store message data for retries." alt="" coords="5,5,208,32"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e" title="Store message data for possible retry." alt="" coords="256,5,463,32"/>
<area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="511,5,599,32"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="ab9c5a22f0cbd4fa648663de7ae7118ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9c5a22f0cbd4fa648663de7ae7118ab">&#9670;&nbsp;</a></span>MQTTProtocol_emptyMessageList()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_emptyMessageList </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
<td class="paramname"><em>msgList</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empty a message list, leaving it able to accept new messages. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msgList</td><td>the message list to empty </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="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph" id="MQTTProtocolClient_8c_ab9c5a22f0cbd4fa648663de7ae7118ab_cgraph">
<area shape="rect" title="Empty a message list, leaving it able to accept new messages." alt="" coords="5,56,229,83"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="959,81,1077,108"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="277,107,499,133"/>
<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"/>
<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"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a52e062f52e5a42275471eeb23040fc0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52e062f52e5a42275471eeb23040fc0e">&#9670;&nbsp;</a></span>MQTTProtocol_freeClient()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_freeClient </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free a client structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the client data to free </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="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph" id="MQTTProtocolClient_8c_a52e062f52e5a42275471eeb23040fc0e_cgraph">
<area shape="rect" title="Free a client structure." alt="" coords="5,31,175,57"/>
<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"/>
<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"/>
<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"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="1435,81,1553,108"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="753,107,975,133"/>
<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"/>
<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"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a8514ddc8d0f346c0da19ab4d59b4062f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8514ddc8d0f346c0da19ab4d59b4062f">&#9670;&nbsp;</a></span>MQTTProtocol_freeMessageList()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_freeMessageList </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
<td class="paramname"><em>msgList</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empty and free up all storage used by a message list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msgList</td><td>the message list to empty and free </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="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph" id="MQTTProtocolClient_8c_a8514ddc8d0f346c0da19ab4d59b4062f_cgraph">
<area shape="rect" title="Empty and free up all storage used by a message list." alt="" coords="5,31,216,57"/>
<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"/>
<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"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="1217,81,1336,108"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="536,107,757,133"/>
<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"/>
<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"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a30c60f9b4ddc352fb24345d3453aa7f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30c60f9b4ddc352fb24345d3453aa7f0">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubacks()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_handlePubacks </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>sock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Process an incoming puback packet for a socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
<tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a30c60f9b4ddc352fb24345d3453aa7f0_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a30c60f9b4ddc352fb24345d3453aa7f0_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a30c60f9b4ddc352fb24345d3453aa7f0_cgraph" id="MQTTProtocolClient_8c_a30c60f9b4ddc352fb24345d3453aa7f0_cgraph">
<area shape="rect" title="Process an incoming puback packet for a socket." alt="" coords="5,5,208,32"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="399,5,517,32"/>
</map>
</div>
</div>
</div>
<a id="aafbc4b72c8d17fe9d8a09cfd467e1990"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafbc4b72c8d17fe9d8a09cfd467e1990">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubcomps()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_handlePubcomps </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>sock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Process an incoming pubcomp packet for a socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
<tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_aafbc4b72c8d17fe9d8a09cfd467e1990_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_aafbc4b72c8d17fe9d8a09cfd467e1990_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_aafbc4b72c8d17fe9d8a09cfd467e1990_cgraph" id="MQTTProtocolClient_8c_aafbc4b72c8d17fe9d8a09cfd467e1990_cgraph">
<area shape="rect" title="Process an incoming pubcomp packet for a socket." alt="" coords="5,5,220,32"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="411,5,529,32"/>
</map>
</div>
</div>
</div>
<a id="ac5311f51f14364c3fdd3798c5a662ae4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5311f51f14364c3fdd3798c5a662ae4">&#9670;&nbsp;</a></span>MQTTProtocol_handlePublishes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_handlePublishes </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>sock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<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>
<p>If it's needed beyond the scope of this function, it has to be copied. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
<tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_ac5311f51f14364c3fdd3798c5a662ae4_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ac5311f51f14364c3fdd3798c5a662ae4_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_ac5311f51f14364c3fdd3798c5a662ae4_cgraph" id="MQTTProtocolClient_8c_ac5311f51f14364c3fdd3798c5a662ae4_cgraph">
<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"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="405,5,524,32"/>
</map>
</div>
</div>
</div>
<a id="a1ae7eec0137c440b015425e28a515c78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ae7eec0137c440b015425e28a515c78">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubrecs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_handlePubrecs </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>sock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Process an incoming pubrec packet for a socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
<tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a1ae7eec0137c440b015425e28a515c78_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a1ae7eec0137c440b015425e28a515c78_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a1ae7eec0137c440b015425e28a515c78_cgraph" id="MQTTProtocolClient_8c_a1ae7eec0137c440b015425e28a515c78_cgraph">
<area shape="rect" title="Process an incoming pubrec packet for a socket." alt="" coords="5,5,205,32"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="396,5,515,32"/>
</map>
</div>
</div>
</div>
<a id="a09fb9a1dce174d6ecd61b8bc5e15b21f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09fb9a1dce174d6ecd61b8bc5e15b21f">&#9670;&nbsp;</a></span>MQTTProtocol_handlePubrels()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_handlePubrels </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>sock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Process an incoming pubrel packet for a socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pack</td><td>pointer to the publish packet </td></tr>
<tr><td class="paramname">sock</td><td>the socket on which the packet was received </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a09fb9a1dce174d6ecd61b8bc5e15b21f_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a09fb9a1dce174d6ecd61b8bc5e15b21f_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a09fb9a1dce174d6ecd61b8bc5e15b21f_cgraph" id="MQTTProtocolClient_8c_a09fb9a1dce174d6ecd61b8bc5e15b21f_cgraph">
<area shape="rect" title="Process an incoming pubrel packet for a socket." alt="" coords="5,5,201,32"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="392,5,511,32"/>
</map>
</div>
</div>
</div>
<a id="a218a69c333badc4a61b321bc830ac1e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a218a69c333badc4a61b321bc830ac1e0">&#9670;&nbsp;</a></span>MQTTProtocol_keepalive()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_keepalive </td>
<td>(</td>
<td class="paramtype">START_TIME_TYPE&#160;</td>
<td class="paramname"><em>now</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>MQTT protocol keepAlive processing. </p>
<p>Sends PINGREQ packets as required. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">now</td><td>current time </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="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph" id="MQTTProtocolClient_8c_a218a69c333badc4a61b321bc830ac1e0_cgraph">
<area shape="rect" title="MQTT protocol keepAlive processing." alt="" coords="5,5,175,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="223,5,341,32"/>
</map>
</div>
</div>
</div>
<a id="a900fa28a8774ad6f5535104bb62e7abf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a900fa28a8774ad6f5535104bb62e7abf">&#9670;&nbsp;</a></span>MQTTProtocol_removePublication()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_removePublication </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structPublications.html">Publications</a> *&#160;</td>
<td class="paramname"><em>p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove stored message data. </p>
<p>Opposite of storePublication </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>stored publication to remove </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="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph" id="MQTTProtocolClient_8c_a900fa28a8774ad6f5535104bb62e7abf_cgraph">
<area shape="rect" title="Remove stored message data." alt="" coords="5,5,227,32"/>
<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"/>
<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"/>
<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"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="687,5,805,32"/>
</map>
</div>
</div>
</div>
<a id="ad2f52c0fff61c891b174d69b95bcd173"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2f52c0fff61c891b174d69b95bcd173">&#9670;&nbsp;</a></span>MQTTProtocol_retries()</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_retries </td>
<td>(</td>
<td class="paramtype">START_TIME_TYPE&#160;</td>
<td class="paramname"><em>now</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>regardless</em>&#160;</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>MQTT retry processing per client. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">now</td><td>current time </td></tr>
<tr><td class="paramname">client</td><td>- the client to which to apply the retry processing </td></tr>
<tr><td class="paramname">regardless</td><td>boolean - retry packets regardless of retry interval (used on reconnect) </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="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph" id="MQTTProtocolClient_8c_ad2f52c0fff61c891b174d69b95bcd173_cgraph">
<area shape="rect" title="MQTT retry processing per client." alt="" coords="5,5,156,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="563,31,681,57"/>
<area shape="rect" href="Socket_8c.html#ae95673b434f2c489ecefe4688c80be2d" title="Indicate whether any data is pending outbound for a socket." alt="" coords="204,31,372,57"/>
<area shape="rect" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452" title="List callback function for comparing integers." alt="" coords="424,31,511,57"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a3a1acc3bd7b09ab9d52e15e4a97c4cb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a1acc3bd7b09ab9d52e15e4a97c4cb2">&#9670;&nbsp;</a></span>MQTTProtocol_retry()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MQTTProtocol_retry </td>
<td>(</td>
<td class="paramtype">START_TIME_TYPE&#160;</td>
<td class="paramname"><em>now</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>doRetry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>regardless</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>MQTT retry protocol and socket pending writes processing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">now</td><td>current time </td></tr>
<tr><td class="paramname">doRetry</td><td>boolean - retries as well as pending writes? </td></tr>
<tr><td class="paramname">regardless</td><td>boolean - retry packets regardless of retry interval (used on reconnect) </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="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph" id="MQTTProtocolClient_8c_a3a1acc3bd7b09ab9d52e15e4a97c4cb2_cgraph">
<area shape="rect" title="MQTT retry protocol and socket pending writes processing." alt="" coords="5,5,144,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="192,5,311,32"/>
</map>
</div>
</div>
</div>
<a id="a0f86c2cc2debfa39e275d3c76d5d0073"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f86c2cc2debfa39e275d3c76d5d0073">&#9670;&nbsp;</a></span>MQTTProtocol_startPublish()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MQTTProtocol_startPublish </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
<td class="paramname"><em>pubclient</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
<td class="paramname"><em>publish</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>qos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>retained</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structMessages.html">Messages</a> **&#160;</td>
<td class="paramname"><em>mm</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start a new publish exchange. </p>
<p>Store any state necessary and try to send the packet </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pubclient</td><td>the client to send the publication to </td></tr>
<tr><td class="paramname">publish</td><td>the publication data </td></tr>
<tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
<tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
<tr><td class="paramname">mm</td><td>- pointer to the message to send </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph" id="MQTTProtocolClient_8c_a0f86c2cc2debfa39e275d3c76d5d0073_cgraph">
<area shape="rect" title="Start a new publish exchange." alt="" coords="5,52,188,79"/>
<area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="769,5,857,32"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#afbf121be11a48fcda3e0d639bc47472b" title="Copy and store message data for retries." alt="" coords="236,52,439,79"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#a4502a4b9257b32508fac87e42fb1d85a" title="Utility function to start a new publish exchange." alt="" coords="246,103,429,145"/>
<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"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#ac753a3ad12292a0a9c2f4343bd33817e" title="Store message data for possible retry." alt="" coords="487,52,693,79"/>
<area shape="rect" href="MQTTPacket_8c.html#a9ebcf93ff2ba3bd103f016c975e9c9c4" title="Send an MQTT PUBLISH packet down a socket." alt="" coords="499,111,681,137"/>
<area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="791,60,835,87"/>
<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"/>
<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"/>
<area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="955,60,1104,87"/>
<area shape="rect" href="MQTTPersistence_8c.html#a879b91862bb099e16ca81e57ba36e3fe" title="Adds a record to the persistent store." alt="" coords="932,111,1127,137"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a4502a4b9257b32508fac87e42fb1d85a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4502a4b9257b32508fac87e42fb1d85a">&#9670;&nbsp;</a></span>MQTTProtocol_startPublishCommon()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int MQTTProtocol_startPublishCommon </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structClients.html">Clients</a> *&#160;</td>
<td class="paramname"><em>pubclient</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
<td class="paramname"><em>publish</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>qos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>retained</em>&#160;</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>Utility function to start a new publish exchange. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pubclient</td><td>the client to send the publication to </td></tr>
<tr><td class="paramname">publish</td><td>the publication data </td></tr>
<tr><td class="paramname">qos</td><td>the MQTT QoS to use </td></tr>
<tr><td class="paramname">retained</td><td>boolean - whether to set the MQTT retained flag </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the completion code </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph" id="MQTTProtocolClient_8c_a4502a4b9257b32508fac87e42fb1d85a_cgraph">
<area shape="rect" title="Utility function to start a new publish exchange." alt="" coords="5,49,188,90"/>
<area shape="rect" href="MQTTPacket_8c.html#a9ebcf93ff2ba3bd103f016c975e9c9c4" title="Send an MQTT PUBLISH packet down a socket." alt="" coords="236,56,419,83"/>
<area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="516,5,560,32"/>
<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"/>
<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"/>
<area shape="rect" href="MQTTPacket_8c.html#aadd77a4fa1b2d5c7791e3542c56af856" title="Encodes the message length according to the MQTT algorithm." alt="" coords="680,5,829,32"/>
<area shape="rect" href="MQTTPersistence_8c.html#a879b91862bb099e16ca81e57ba36e3fe" title="Adds a record to the persistent store." alt="" coords="657,56,852,83"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="ac753a3ad12292a0a9c2f4343bd33817e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac753a3ad12292a0a9c2f4343bd33817e">&#9670;&nbsp;</a></span>MQTTProtocol_storePublication()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structPublications.html">Publications</a>* MQTTProtocol_storePublication </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structPublish.html">Publish</a> *&#160;</td>
<td class="paramname"><em>publish</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>len</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Store message data for possible retry. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">publish</td><td>the publication data </td></tr>
<tr><td class="paramname">len</td><td>returned length of the data stored </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the publication stored </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph" id="MQTTProtocolClient_8c_ac753a3ad12292a0a9c2f4343bd33817e_cgraph">
<area shape="rect" title="Store message data for possible retry." alt="" coords="5,5,212,32"/>
<area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="260,5,348,32"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a89588f085edc5cee4eb650e8ad114df4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89588f085edc5cee4eb650e8ad114df4">&#9670;&nbsp;</a></span>MQTTStrdup()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* MQTTStrdup </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Duplicate a string, safely, allocating space on the heap. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>the source string which characters copy from </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the duplicated, allocated string </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph" id="MQTTProtocolClient_8c_a89588f085edc5cee4eb650e8ad114df4_cgraph">
<area shape="rect" title="Duplicate a string, safely, allocating space on the heap." alt="" coords="5,5,103,32"/>
<area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="301,5,345,32"/>
<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"/>
</map>
</div>
</div>
</div>
<a id="a447b65c664ebedef8fecb70e29dc1767"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a447b65c664ebedef8fecb70e29dc1767">&#9670;&nbsp;</a></span>MQTTStrncpy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* MQTTStrncpy </td>
<td>(</td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>dest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>dest_size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy no more than dest_size -1 characters from the string pointed to by src to the array pointed to by dest. </p>
<p>The destination string will always be null-terminated. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dest</td><td>the array which characters copy to </td></tr>
<tr><td class="paramname">src</td><td>the source string which characters copy from </td></tr>
<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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the destination string pointer </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph.png" border="0" usemap="#MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph" alt=""/></div>
<map name="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph" id="MQTTProtocolClient_8c_a447b65c664ebedef8fecb70e29dc1767_cgraph">
<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"/>
<area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="156,5,200,32"/>
</map>
</div>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Nov 21 2020 00:15:30 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>