SocketBuffer_8c.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  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: SocketBuffer.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="#func-members">Functions</a> &#124;
  65. <a href="#var-members">Variables</a> </div>
  66. <div class="headertitle">
  67. <div class="title">SocketBuffer.c File Reference</div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>Socket buffering related functions.
  71. <a href="#details">More...</a></p>
  72. <div class="textblock"><code>#include &quot;SocketBuffer.h&quot;</code><br />
  73. <code>#include &quot;LinkedList.h&quot;</code><br />
  74. <code>#include &quot;Log.h&quot;</code><br />
  75. <code>#include &quot;Messages.h&quot;</code><br />
  76. <code>#include &quot;StackTrace.h&quot;</code><br />
  77. <code>#include &lt;stdlib.h&gt;</code><br />
  78. <code>#include &lt;stdio.h&gt;</code><br />
  79. <code>#include &lt;string.h&gt;</code><br />
  80. <code>#include &quot;Heap.h&quot;</code><br />
  81. </div><div class="textblock"><div class="dynheader">
  82. Include dependency graph for SocketBuffer.c:</div>
  83. <div class="dyncontent">
  84. <div class="center"><img src="SocketBuffer_8c__incl.png" border="0" usemap="#SocketBuffer_8c" alt=""/></div>
  85. <map name="SocketBuffer_8c" id="SocketBuffer_8c">
  86. <area shape="rect" title="Socket buffering related functions." alt="" coords="69,5,175,32"/>
  87. <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
  88. <area shape="rect" title=" " alt="" coords="92,80,152,107"/>
  89. <area shape="rect" title=" " alt="" coords="177,80,241,107"/>
  90. </map>
  91. </div>
  92. </div><table class="memberdecls">
  93. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  94. Functions</h2></td></tr>
  95. <tr class="memitem:acebc1cbb93be4588f33b04ed404f6dbf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf">socketcompare</a> (void *a, void *b)</td></tr>
  96. <tr class="memdesc:acebc1cbb93be4588f33b04ed404f6dbf"><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 socket_queues by socket. <a href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf">More...</a><br /></td></tr>
  97. <tr class="separator:acebc1cbb93be4588f33b04ed404f6dbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a9293d4ef45aa2a51baab9be4eb73091b"><td class="memItemLeft" align="right" valign="top"><a id="a9293d4ef45aa2a51baab9be4eb73091b"></a>
  99. int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a9293d4ef45aa2a51baab9be4eb73091b">SocketBuffer_newDefQ</a> (void)</td></tr>
  100. <tr class="memdesc:a9293d4ef45aa2a51baab9be4eb73091b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new default queue when one has just been used. <br /></td></tr>
  101. <tr class="separator:a9293d4ef45aa2a51baab9be4eb73091b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:acb4511a3a4767187a2607027aff718b8"><td class="memItemLeft" align="right" valign="top"><a id="acb4511a3a4767187a2607027aff718b8"></a>
  103. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#acb4511a3a4767187a2607027aff718b8">SocketBuffer_freeDefQ</a> (void)</td></tr>
  104. <tr class="memdesc:acb4511a3a4767187a2607027aff718b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free the default queue memory. <br /></td></tr>
  105. <tr class="separator:acb4511a3a4767187a2607027aff718b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a39f1ee9c98bc12a7be4d7a40b03550d5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5">pending_socketcompare</a> (void *a, void *b)</td></tr>
  107. <tr class="memdesc:a39f1ee9c98bc12a7be4d7a40b03550d5"><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 <a class="el" href="structpending__writes.html">pending_writes</a> by socket. <a href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5">More...</a><br /></td></tr>
  108. <tr class="separator:a39f1ee9c98bc12a7be4d7a40b03550d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:abc8599ffc6f7ad91a7748e5d78bbd926"><td class="memItemLeft" align="right" valign="top"><a id="abc8599ffc6f7ad91a7748e5d78bbd926"></a>
  110. int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#abc8599ffc6f7ad91a7748e5d78bbd926">SocketBuffer_initialize</a> (void)</td></tr>
  111. <tr class="memdesc:abc8599ffc6f7ad91a7748e5d78bbd926"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the socketBuffer module. <br /></td></tr>
  112. <tr class="separator:abc8599ffc6f7ad91a7748e5d78bbd926"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a4a8d6188b4775789810a44396d05cf19"><td class="memItemLeft" align="right" valign="top"><a id="a4a8d6188b4775789810a44396d05cf19"></a>
  114. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a4a8d6188b4775789810a44396d05cf19">SocketBuffer_terminate</a> (void)</td></tr>
  115. <tr class="memdesc:a4a8d6188b4775789810a44396d05cf19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminate the socketBuffer module. <br /></td></tr>
  116. <tr class="separator:a4a8d6188b4775789810a44396d05cf19"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:abb5eae96f4c62d1e6fefed8d078ecba8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#abb5eae96f4c62d1e6fefed8d078ecba8">SocketBuffer_cleanup</a> (SOCKET socket)</td></tr>
  118. <tr class="memdesc:abb5eae96f4c62d1e6fefed8d078ecba8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleanup any buffers for a specific socket. <a href="SocketBuffer_8c.html#abb5eae96f4c62d1e6fefed8d078ecba8">More...</a><br /></td></tr>
  119. <tr class="separator:abb5eae96f4c62d1e6fefed8d078ecba8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:afcc9b9b6bd255b0a6e4c7e4f5a36bb37"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#afcc9b9b6bd255b0a6e4c7e4f5a36bb37">SocketBuffer_getQueuedData</a> (SOCKET socket, size_t <a class="el" href="utf-8_8c.html#abf4b7aec66b165e9a0a8e3a4ad69f863">bytes</a>, size_t *actual_len)</td></tr>
  121. <tr class="memdesc:afcc9b9b6bd255b0a6e4c7e4f5a36bb37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get any queued data for a specific socket. <a href="SocketBuffer_8c.html#afcc9b9b6bd255b0a6e4c7e4f5a36bb37">More...</a><br /></td></tr>
  122. <tr class="separator:afcc9b9b6bd255b0a6e4c7e4f5a36bb37"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a999ec229faa4b2e2c0f7db87693bc1f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a999ec229faa4b2e2c0f7db87693bc1f8">SocketBuffer_getQueuedChar</a> (SOCKET socket, char *c)</td></tr>
  124. <tr class="memdesc:a999ec229faa4b2e2c0f7db87693bc1f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get any queued character for a specific socket. <a href="SocketBuffer_8c.html#a999ec229faa4b2e2c0f7db87693bc1f8">More...</a><br /></td></tr>
  125. <tr class="separator:a999ec229faa4b2e2c0f7db87693bc1f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a412a40b44b12901e63e662ac0e5be0af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a412a40b44b12901e63e662ac0e5be0af">SocketBuffer_interrupted</a> (SOCKET socket, size_t actual_len)</td></tr>
  127. <tr class="memdesc:a412a40b44b12901e63e662ac0e5be0af"><td class="mdescLeft">&#160;</td><td class="mdescRight">A socket read was interrupted so we need to queue data. <a href="SocketBuffer_8c.html#a412a40b44b12901e63e662ac0e5be0af">More...</a><br /></td></tr>
  128. <tr class="separator:a412a40b44b12901e63e662ac0e5be0af"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:a8b7b6acbf2ec65796c32da7fd55c3ee8"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a8b7b6acbf2ec65796c32da7fd55c3ee8">SocketBuffer_complete</a> (SOCKET socket)</td></tr>
  130. <tr class="memdesc:a8b7b6acbf2ec65796c32da7fd55c3ee8"><td class="mdescLeft">&#160;</td><td class="mdescRight">A socket read has now completed so we can get rid of the queue. <a href="SocketBuffer_8c.html#a8b7b6acbf2ec65796c32da7fd55c3ee8">More...</a><br /></td></tr>
  131. <tr class="separator:a8b7b6acbf2ec65796c32da7fd55c3ee8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a2f6bac9a46fd116e58071ff49152d716"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a2f6bac9a46fd116e58071ff49152d716">SocketBuffer_queueChar</a> (SOCKET socket, char c)</td></tr>
  133. <tr class="memdesc:a2f6bac9a46fd116e58071ff49152d716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queued a Charactor to a specific socket. <a href="SocketBuffer_8c.html#a2f6bac9a46fd116e58071ff49152d716">More...</a><br /></td></tr>
  134. <tr class="separator:a2f6bac9a46fd116e58071ff49152d716"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:aa61a564b814b06d9cfd3fe9ce7ab1cf7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#aa61a564b814b06d9cfd3fe9ce7ab1cf7">SocketBuffer_pendingWrite</a> (SOCKET socket, int count, iobuf *iovecs, int *frees, size_t total, size_t <a class="el" href="utf-8_8c.html#abf4b7aec66b165e9a0a8e3a4ad69f863">bytes</a>)</td></tr>
  136. <tr class="memdesc:aa61a564b814b06d9cfd3fe9ce7ab1cf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">A socket write was interrupted so store the remaining data. <a href="SocketBuffer_8c.html#aa61a564b814b06d9cfd3fe9ce7ab1cf7">More...</a><br /></td></tr>
  137. <tr class="separator:aa61a564b814b06d9cfd3fe9ce7ab1cf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a524311e577a7225a09fb944904c17886"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpending__writes.html">pending_writes</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a524311e577a7225a09fb944904c17886">SocketBuffer_getWrite</a> (SOCKET socket)</td></tr>
  139. <tr class="memdesc:a524311e577a7225a09fb944904c17886"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get any queued write data for a specific socket. <a href="SocketBuffer_8c.html#a524311e577a7225a09fb944904c17886">More...</a><br /></td></tr>
  140. <tr class="separator:a524311e577a7225a09fb944904c17886"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:ae8667990c5933c3af9b90a163bba34dc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#ae8667990c5933c3af9b90a163bba34dc">SocketBuffer_writeComplete</a> (SOCKET socket)</td></tr>
  142. <tr class="memdesc:ae8667990c5933c3af9b90a163bba34dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">A socket write has now completed so we can get rid of the queue. <a href="SocketBuffer_8c.html#ae8667990c5933c3af9b90a163bba34dc">More...</a><br /></td></tr>
  143. <tr class="separator:ae8667990c5933c3af9b90a163bba34dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:a7ba9075e011f49302304ce7b2d8e5b59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpending__writes.html">pending_writes</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a7ba9075e011f49302304ce7b2d8e5b59">SocketBuffer_updateWrite</a> (SOCKET socket, char *topic, char *payload)</td></tr>
  145. <tr class="memdesc:a7ba9075e011f49302304ce7b2d8e5b59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the queued write data for a socket in the case of QoS 0 messages. <a href="SocketBuffer_8c.html#a7ba9075e011f49302304ce7b2d8e5b59">More...</a><br /></td></tr>
  146. <tr class="separator:a7ba9075e011f49302304ce7b2d8e5b59"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. </table><table class="memberdecls">
  148. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  149. Variables</h2></td></tr>
  150. <tr class="memitem:ace376d23d15b97a487298fa0c8a238ea"><td class="memItemLeft" align="right" valign="top"><a id="ace376d23d15b97a487298fa0c8a238ea"></a>
  151. static <a class="el" href="structsocket__queue.html">socket_queue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#ace376d23d15b97a487298fa0c8a238ea">def_queue</a></td></tr>
  152. <tr class="memdesc:ace376d23d15b97a487298fa0c8a238ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default input queue buffer. <br /></td></tr>
  153. <tr class="separator:ace376d23d15b97a487298fa0c8a238ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:aa8b85db4dca13d13c2b7fc704420323a"><td class="memItemLeft" align="right" valign="top"><a id="aa8b85db4dca13d13c2b7fc704420323a"></a>
  155. static <a class="el" href="structList.html">List</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#aa8b85db4dca13d13c2b7fc704420323a">queues</a></td></tr>
  156. <tr class="memdesc:aa8b85db4dca13d13c2b7fc704420323a"><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> of queued input buffers. <br /></td></tr>
  157. <tr class="separator:aa8b85db4dca13d13c2b7fc704420323a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="memitem:a913f78789f0cbfb26a5dcf6618d51d87"><td class="memItemLeft" align="right" valign="top"><a id="a913f78789f0cbfb26a5dcf6618d51d87"></a>
  159. static <a class="el" href="structList.html">List</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SocketBuffer_8c.html#a913f78789f0cbfb26a5dcf6618d51d87">writes</a></td></tr>
  160. <tr class="memdesc:a913f78789f0cbfb26a5dcf6618d51d87"><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> of queued write buffers. <br /></td></tr>
  161. <tr class="separator:a913f78789f0cbfb26a5dcf6618d51d87"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. </table>
  163. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  164. <div class="textblock"><p>Socket buffering related functions. </p>
  165. <p>Some other related functions are in the Socket module </p>
  166. </div><h2 class="groupheader">Function Documentation</h2>
  167. <a id="a39f1ee9c98bc12a7be4d7a40b03550d5"></a>
  168. <h2 class="memtitle"><span class="permalink"><a href="#a39f1ee9c98bc12a7be4d7a40b03550d5">&#9670;&nbsp;</a></span>pending_socketcompare()</h2>
  169. <div class="memitem">
  170. <div class="memproto">
  171. <table class="memname">
  172. <tr>
  173. <td class="memname">int pending_socketcompare </td>
  174. <td>(</td>
  175. <td class="paramtype">void *&#160;</td>
  176. <td class="paramname"><em>a</em>, </td>
  177. </tr>
  178. <tr>
  179. <td class="paramkey"></td>
  180. <td></td>
  181. <td class="paramtype">void *&#160;</td>
  182. <td class="paramname"><em>b</em>&#160;</td>
  183. </tr>
  184. <tr>
  185. <td></td>
  186. <td>)</td>
  187. <td></td><td></td>
  188. </tr>
  189. </table>
  190. </div><div class="memdoc">
  191. <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing <a class="el" href="structpending__writes.html">pending_writes</a> by socket. </p>
  192. <dl class="params"><dt>Parameters</dt><dd>
  193. <table class="params">
  194. <tr><td class="paramname">a</td><td>first integer value </td></tr>
  195. <tr><td class="paramname">b</td><td>second integer value </td></tr>
  196. </table>
  197. </dd>
  198. </dl>
  199. <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
  200. </div>
  201. </div>
  202. <a id="abb5eae96f4c62d1e6fefed8d078ecba8"></a>
  203. <h2 class="memtitle"><span class="permalink"><a href="#abb5eae96f4c62d1e6fefed8d078ecba8">&#9670;&nbsp;</a></span>SocketBuffer_cleanup()</h2>
  204. <div class="memitem">
  205. <div class="memproto">
  206. <table class="memname">
  207. <tr>
  208. <td class="memname">void SocketBuffer_cleanup </td>
  209. <td>(</td>
  210. <td class="paramtype">SOCKET&#160;</td>
  211. <td class="paramname"><em>socket</em></td><td>)</td>
  212. <td></td>
  213. </tr>
  214. </table>
  215. </div><div class="memdoc">
  216. <p>Cleanup any buffers for a specific socket. </p>
  217. <dl class="params"><dt>Parameters</dt><dd>
  218. <table class="params">
  219. <tr><td class="paramname">socket</td><td>the socket to clean up </td></tr>
  220. </table>
  221. </dd>
  222. </dl>
  223. <div class="dynheader">
  224. Here is the call graph for this function:</div>
  225. <div class="dyncontent">
  226. <div class="center"><img src="SocketBuffer_8c_abb5eae96f4c62d1e6fefed8d078ecba8_cgraph.png" border="0" usemap="#SocketBuffer_8c_abb5eae96f4c62d1e6fefed8d078ecba8_cgraph" alt=""/></div>
  227. <map name="SocketBuffer_8c_abb5eae96f4c62d1e6fefed8d078ecba8_cgraph" id="SocketBuffer_8c_abb5eae96f4c62d1e6fefed8d078ecba8_cgraph">
  228. <area shape="rect" title="Cleanup any buffers for a specific socket." alt="" coords="5,56,155,83"/>
  229. <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="777,5,872,32"/>
  230. <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="473,31,565,57"/>
  231. <area shape="rect" href="SocketBuffer_8c.html#ae8667990c5933c3af9b90a163bba34dc" title="A socket write has now completed so we can get rid of the queue." alt="" coords="203,81,389,108"/>
  232. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="241,132,351,159"/>
  233. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="920,5,1039,32"/>
  234. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="648,31,729,57"/>
  235. <area shape="rect" href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d" title="Removes and frees an element in a list by comparing the content." alt="" coords="459,81,578,108"/>
  236. <area shape="rect" href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5" title="List callback function for comparing pending_writes by socket." alt="" coords="437,132,600,159"/>
  237. </map>
  238. </div>
  239. </div>
  240. </div>
  241. <a id="a8b7b6acbf2ec65796c32da7fd55c3ee8"></a>
  242. <h2 class="memtitle"><span class="permalink"><a href="#a8b7b6acbf2ec65796c32da7fd55c3ee8">&#9670;&nbsp;</a></span>SocketBuffer_complete()</h2>
  243. <div class="memitem">
  244. <div class="memproto">
  245. <table class="memname">
  246. <tr>
  247. <td class="memname">char* SocketBuffer_complete </td>
  248. <td>(</td>
  249. <td class="paramtype">SOCKET&#160;</td>
  250. <td class="paramname"><em>socket</em></td><td>)</td>
  251. <td></td>
  252. </tr>
  253. </table>
  254. </div><div class="memdoc">
  255. <p>A socket read has now completed so we can get rid of the queue. </p>
  256. <dl class="params"><dt>Parameters</dt><dd>
  257. <table class="params">
  258. <tr><td class="paramname">socket</td><td>the socket for which the operation is now complete </td></tr>
  259. </table>
  260. </dd>
  261. </dl>
  262. <dl class="section return"><dt>Returns</dt><dd>pointer to the default queue data </dd></dl>
  263. <div class="dynheader">
  264. Here is the call graph for this function:</div>
  265. <div class="dyncontent">
  266. <div class="center"><img src="SocketBuffer_8c_a8b7b6acbf2ec65796c32da7fd55c3ee8_cgraph.png" border="0" usemap="#SocketBuffer_8c_a8b7b6acbf2ec65796c32da7fd55c3ee8_cgraph" alt=""/></div>
  267. <map name="SocketBuffer_8c_a8b7b6acbf2ec65796c32da7fd55c3ee8_cgraph" id="SocketBuffer_8c_a8b7b6acbf2ec65796c32da7fd55c3ee8_cgraph">
  268. <area shape="rect" title="A socket read has now completed so we can get rid of the queue." alt="" coords="5,81,163,108"/>
  269. <area shape="rect" href="LinkedList_8c.html#ab2bcc1897abf1d98490ea81c474dba52" title="Removes but does not free an item in a list by comparing the pointer to the content." alt="" coords="246,5,331,32"/>
  270. <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,31,639,57"/>
  271. <area shape="rect" href="SocketBuffer_8c.html#acb4511a3a4767187a2607027aff718b8" title="Free the default queue memory." alt="" coords="211,107,367,133"/>
  272. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="233,157,344,184"/>
  273. <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"/>
  274. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="687,31,805,57"/>
  275. </map>
  276. </div>
  277. </div>
  278. </div>
  279. <a id="a999ec229faa4b2e2c0f7db87693bc1f8"></a>
  280. <h2 class="memtitle"><span class="permalink"><a href="#a999ec229faa4b2e2c0f7db87693bc1f8">&#9670;&nbsp;</a></span>SocketBuffer_getQueuedChar()</h2>
  281. <div class="memitem">
  282. <div class="memproto">
  283. <table class="memname">
  284. <tr>
  285. <td class="memname">int SocketBuffer_getQueuedChar </td>
  286. <td>(</td>
  287. <td class="paramtype">SOCKET&#160;</td>
  288. <td class="paramname"><em>socket</em>, </td>
  289. </tr>
  290. <tr>
  291. <td class="paramkey"></td>
  292. <td></td>
  293. <td class="paramtype">char *&#160;</td>
  294. <td class="paramname"><em>c</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>Get any queued character for a specific socket. </p>
  304. <dl class="params"><dt>Parameters</dt><dd>
  305. <table class="params">
  306. <tr><td class="paramname">socket</td><td>the socket to get queued data for </td></tr>
  307. <tr><td class="paramname">c</td><td>the character returned if any </td></tr>
  308. </table>
  309. </dd>
  310. </dl>
  311. <dl class="section return"><dt>Returns</dt><dd>completion code </dd></dl>
  312. <div class="dynheader">
  313. Here is the call graph for this function:</div>
  314. <div class="dyncontent">
  315. <div class="center"><img src="SocketBuffer_8c_a999ec229faa4b2e2c0f7db87693bc1f8_cgraph.png" border="0" usemap="#SocketBuffer_8c_a999ec229faa4b2e2c0f7db87693bc1f8_cgraph" alt=""/></div>
  316. <map name="SocketBuffer_8c_a999ec229faa4b2e2c0f7db87693bc1f8_cgraph" id="SocketBuffer_8c_a999ec229faa4b2e2c0f7db87693bc1f8_cgraph">
  317. <area shape="rect" title="Get any queued character for a specific socket." alt="" coords="5,56,200,83"/>
  318. <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"/>
  319. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="281,56,325,83"/>
  320. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="248,107,359,133"/>
  321. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="407,5,525,32"/>
  322. </map>
  323. </div>
  324. </div>
  325. </div>
  326. <a id="afcc9b9b6bd255b0a6e4c7e4f5a36bb37"></a>
  327. <h2 class="memtitle"><span class="permalink"><a href="#afcc9b9b6bd255b0a6e4c7e4f5a36bb37">&#9670;&nbsp;</a></span>SocketBuffer_getQueuedData()</h2>
  328. <div class="memitem">
  329. <div class="memproto">
  330. <table class="memname">
  331. <tr>
  332. <td class="memname">char* SocketBuffer_getQueuedData </td>
  333. <td>(</td>
  334. <td class="paramtype">SOCKET&#160;</td>
  335. <td class="paramname"><em>socket</em>, </td>
  336. </tr>
  337. <tr>
  338. <td class="paramkey"></td>
  339. <td></td>
  340. <td class="paramtype">size_t&#160;</td>
  341. <td class="paramname"><em>bytes</em>, </td>
  342. </tr>
  343. <tr>
  344. <td class="paramkey"></td>
  345. <td></td>
  346. <td class="paramtype">size_t *&#160;</td>
  347. <td class="paramname"><em>actual_len</em>&#160;</td>
  348. </tr>
  349. <tr>
  350. <td></td>
  351. <td>)</td>
  352. <td></td><td></td>
  353. </tr>
  354. </table>
  355. </div><div class="memdoc">
  356. <p>Get any queued data for a specific socket. </p>
  357. <dl class="params"><dt>Parameters</dt><dd>
  358. <table class="params">
  359. <tr><td class="paramname">socket</td><td>the socket to get queued data for </td></tr>
  360. <tr><td class="paramname">bytes</td><td>the number of bytes of data to retrieve </td></tr>
  361. <tr><td class="paramname">actual_len</td><td>the actual length returned </td></tr>
  362. </table>
  363. </dd>
  364. </dl>
  365. <dl class="section return"><dt>Returns</dt><dd>the actual data </dd></dl>
  366. <div class="dynheader">
  367. Here is the call graph for this function:</div>
  368. <div class="dyncontent">
  369. <div class="center"><img src="SocketBuffer_8c_afcc9b9b6bd255b0a6e4c7e4f5a36bb37_cgraph.png" border="0" usemap="#SocketBuffer_8c_afcc9b9b6bd255b0a6e4c7e4f5a36bb37_cgraph" alt=""/></div>
  370. <map name="SocketBuffer_8c_afcc9b9b6bd255b0a6e4c7e4f5a36bb37_cgraph" id="SocketBuffer_8c_afcc9b9b6bd255b0a6e4c7e4f5a36bb37_cgraph">
  371. <area shape="rect" title="Get any queued data for a specific socket." alt="" coords="5,31,200,57"/>
  372. <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"/>
  373. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="248,56,359,83"/>
  374. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="407,5,525,32"/>
  375. </map>
  376. </div>
  377. </div>
  378. </div>
  379. <a id="a524311e577a7225a09fb944904c17886"></a>
  380. <h2 class="memtitle"><span class="permalink"><a href="#a524311e577a7225a09fb944904c17886">&#9670;&nbsp;</a></span>SocketBuffer_getWrite()</h2>
  381. <div class="memitem">
  382. <div class="memproto">
  383. <table class="memname">
  384. <tr>
  385. <td class="memname"><a class="el" href="structpending__writes.html">pending_writes</a>* SocketBuffer_getWrite </td>
  386. <td>(</td>
  387. <td class="paramtype">SOCKET&#160;</td>
  388. <td class="paramname"><em>socket</em></td><td>)</td>
  389. <td></td>
  390. </tr>
  391. </table>
  392. </div><div class="memdoc">
  393. <p>Get any queued write data for a specific socket. </p>
  394. <dl class="params"><dt>Parameters</dt><dd>
  395. <table class="params">
  396. <tr><td class="paramname">socket</td><td>the socket to get queued data for </td></tr>
  397. </table>
  398. </dd>
  399. </dl>
  400. <dl class="section return"><dt>Returns</dt><dd>pointer to the queued data or NULL </dd></dl>
  401. <div class="dynheader">
  402. Here is the call graph for this function:</div>
  403. <div class="dyncontent">
  404. <div class="center"><img src="SocketBuffer_8c_a524311e577a7225a09fb944904c17886_cgraph.png" border="0" usemap="#SocketBuffer_8c_a524311e577a7225a09fb944904c17886_cgraph" alt=""/></div>
  405. <map name="SocketBuffer_8c_a524311e577a7225a09fb944904c17886_cgraph" id="SocketBuffer_8c_a524311e577a7225a09fb944904c17886_cgraph">
  406. <area shape="rect" title="Get any queued write data for a specific socket." alt="" coords="5,31,157,57"/>
  407. <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="239,5,334,32"/>
  408. <area shape="rect" href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5" title="List callback function for comparing pending_writes by socket." alt="" coords="205,56,368,83"/>
  409. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="416,5,535,32"/>
  410. </map>
  411. </div>
  412. </div>
  413. </div>
  414. <a id="a412a40b44b12901e63e662ac0e5be0af"></a>
  415. <h2 class="memtitle"><span class="permalink"><a href="#a412a40b44b12901e63e662ac0e5be0af">&#9670;&nbsp;</a></span>SocketBuffer_interrupted()</h2>
  416. <div class="memitem">
  417. <div class="memproto">
  418. <table class="memname">
  419. <tr>
  420. <td class="memname">void SocketBuffer_interrupted </td>
  421. <td>(</td>
  422. <td class="paramtype">SOCKET&#160;</td>
  423. <td class="paramname"><em>socket</em>, </td>
  424. </tr>
  425. <tr>
  426. <td class="paramkey"></td>
  427. <td></td>
  428. <td class="paramtype">size_t&#160;</td>
  429. <td class="paramname"><em>actual_len</em>&#160;</td>
  430. </tr>
  431. <tr>
  432. <td></td>
  433. <td>)</td>
  434. <td></td><td></td>
  435. </tr>
  436. </table>
  437. </div><div class="memdoc">
  438. <p>A socket read was interrupted so we need to queue data. </p>
  439. <dl class="params"><dt>Parameters</dt><dd>
  440. <table class="params">
  441. <tr><td class="paramname">socket</td><td>the socket to get queued data for </td></tr>
  442. <tr><td class="paramname">actual_len</td><td>the actual length of data that was read </td></tr>
  443. </table>
  444. </dd>
  445. </dl>
  446. <div class="dynheader">
  447. Here is the call graph for this function:</div>
  448. <div class="dyncontent">
  449. <div class="center"><img src="SocketBuffer_8c_a412a40b44b12901e63e662ac0e5be0af_cgraph.png" border="0" usemap="#SocketBuffer_8c_a412a40b44b12901e63e662ac0e5be0af_cgraph" alt=""/></div>
  450. <map name="SocketBuffer_8c_a412a40b44b12901e63e662ac0e5be0af_cgraph" id="SocketBuffer_8c_a412a40b44b12901e63e662ac0e5be0af_cgraph">
  451. <area shape="rect" title="A socket read was interrupted so we need to queue data." alt="" coords="5,81,171,108"/>
  452. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="254,5,342,32"/>
  453. <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="251,56,345,83"/>
  454. <area shape="rect" href="SocketBuffer_8c.html#a9293d4ef45aa2a51baab9be4eb73091b" title="Create a new default queue when one has just been used." alt="" coords="219,107,377,133"/>
  455. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="243,157,353,184"/>
  456. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="425,5,568,32"/>
  457. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="437,56,556,83"/>
  458. </map>
  459. </div>
  460. </div>
  461. </div>
  462. <a id="aa61a564b814b06d9cfd3fe9ce7ab1cf7"></a>
  463. <h2 class="memtitle"><span class="permalink"><a href="#aa61a564b814b06d9cfd3fe9ce7ab1cf7">&#9670;&nbsp;</a></span>SocketBuffer_pendingWrite()</h2>
  464. <div class="memitem">
  465. <div class="memproto">
  466. <table class="memname">
  467. <tr>
  468. <td class="memname">int SocketBuffer_pendingWrite </td>
  469. <td>(</td>
  470. <td class="paramtype">SOCKET&#160;</td>
  471. <td class="paramname"><em>socket</em>, </td>
  472. </tr>
  473. <tr>
  474. <td class="paramkey"></td>
  475. <td></td>
  476. <td class="paramtype">int&#160;</td>
  477. <td class="paramname"><em>count</em>, </td>
  478. </tr>
  479. <tr>
  480. <td class="paramkey"></td>
  481. <td></td>
  482. <td class="paramtype">iobuf *&#160;</td>
  483. <td class="paramname"><em>iovecs</em>, </td>
  484. </tr>
  485. <tr>
  486. <td class="paramkey"></td>
  487. <td></td>
  488. <td class="paramtype">int *&#160;</td>
  489. <td class="paramname"><em>frees</em>, </td>
  490. </tr>
  491. <tr>
  492. <td class="paramkey"></td>
  493. <td></td>
  494. <td class="paramtype">size_t&#160;</td>
  495. <td class="paramname"><em>total</em>, </td>
  496. </tr>
  497. <tr>
  498. <td class="paramkey"></td>
  499. <td></td>
  500. <td class="paramtype">size_t&#160;</td>
  501. <td class="paramname"><em>bytes</em>&#160;</td>
  502. </tr>
  503. <tr>
  504. <td></td>
  505. <td>)</td>
  506. <td></td><td></td>
  507. </tr>
  508. </table>
  509. </div><div class="memdoc">
  510. <p>A socket write was interrupted so store the remaining data. </p>
  511. <dl class="params"><dt>Parameters</dt><dd>
  512. <table class="params">
  513. <tr><td class="paramname">socket</td><td>the socket for which the write was interrupted </td></tr>
  514. <tr><td class="paramname">count</td><td>the number of iovec buffers </td></tr>
  515. <tr><td class="paramname">iovecs</td><td>buffer array </td></tr>
  516. <tr><td class="paramname">frees</td><td>a set of flags indicating which of the iovecs array should be freed </td></tr>
  517. <tr><td class="paramname">total</td><td>total data length to be written </td></tr>
  518. <tr><td class="paramname">bytes</td><td>actual data length that was written </td></tr>
  519. </table>
  520. </dd>
  521. </dl>
  522. <div class="dynheader">
  523. Here is the call graph for this function:</div>
  524. <div class="dyncontent">
  525. <div class="center"><img src="SocketBuffer_8c_aa61a564b814b06d9cfd3fe9ce7ab1cf7_cgraph.png" border="0" usemap="#SocketBuffer_8c_aa61a564b814b06d9cfd3fe9ce7ab1cf7_cgraph" alt=""/></div>
  526. <map name="SocketBuffer_8c_aa61a564b814b06d9cfd3fe9ce7ab1cf7_cgraph" id="SocketBuffer_8c_aa61a564b814b06d9cfd3fe9ce7ab1cf7_cgraph">
  527. <area shape="rect" title="A socket write was interrupted so store the remaining data." alt="" coords="5,5,184,32"/>
  528. <area shape="rect" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4" title="Append an item to a list." alt="" coords="232,5,320,32"/>
  529. <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="368,5,511,32"/>
  530. </map>
  531. </div>
  532. </div>
  533. </div>
  534. <a id="a2f6bac9a46fd116e58071ff49152d716"></a>
  535. <h2 class="memtitle"><span class="permalink"><a href="#a2f6bac9a46fd116e58071ff49152d716">&#9670;&nbsp;</a></span>SocketBuffer_queueChar()</h2>
  536. <div class="memitem">
  537. <div class="memproto">
  538. <table class="memname">
  539. <tr>
  540. <td class="memname">void SocketBuffer_queueChar </td>
  541. <td>(</td>
  542. <td class="paramtype">SOCKET&#160;</td>
  543. <td class="paramname"><em>socket</em>, </td>
  544. </tr>
  545. <tr>
  546. <td class="paramkey"></td>
  547. <td></td>
  548. <td class="paramtype">char&#160;</td>
  549. <td class="paramname"><em>c</em>&#160;</td>
  550. </tr>
  551. <tr>
  552. <td></td>
  553. <td>)</td>
  554. <td></td><td></td>
  555. </tr>
  556. </table>
  557. </div><div class="memdoc">
  558. <p>Queued a Charactor to a specific socket. </p>
  559. <dl class="params"><dt>Parameters</dt><dd>
  560. <table class="params">
  561. <tr><td class="paramname">socket</td><td>the socket for which to queue char for </td></tr>
  562. <tr><td class="paramname">c</td><td>the character to queue </td></tr>
  563. </table>
  564. </dd>
  565. </dl>
  566. <div class="dynheader">
  567. Here is the call graph for this function:</div>
  568. <div class="dyncontent">
  569. <div class="center"><img src="SocketBuffer_8c_a2f6bac9a46fd116e58071ff49152d716_cgraph.png" border="0" usemap="#SocketBuffer_8c_a2f6bac9a46fd116e58071ff49152d716_cgraph" alt=""/></div>
  570. <map name="SocketBuffer_8c_a2f6bac9a46fd116e58071ff49152d716_cgraph" id="SocketBuffer_8c_a2f6bac9a46fd116e58071ff49152d716_cgraph">
  571. <area shape="rect" title="Queued a Charactor to a specific socket." alt="" coords="5,56,172,83"/>
  572. <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="228,5,323,32"/>
  573. <area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="253,56,297,83"/>
  574. <area shape="rect" href="SocketBuffer_8c.html#acebc1cbb93be4588f33b04ed404f6dbf" title="List callback function for comparing socket_queues by socket." alt="" coords="220,107,331,133"/>
  575. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="379,5,497,32"/>
  576. </map>
  577. </div>
  578. </div>
  579. </div>
  580. <a id="a7ba9075e011f49302304ce7b2d8e5b59"></a>
  581. <h2 class="memtitle"><span class="permalink"><a href="#a7ba9075e011f49302304ce7b2d8e5b59">&#9670;&nbsp;</a></span>SocketBuffer_updateWrite()</h2>
  582. <div class="memitem">
  583. <div class="memproto">
  584. <table class="memname">
  585. <tr>
  586. <td class="memname"><a class="el" href="structpending__writes.html">pending_writes</a>* SocketBuffer_updateWrite </td>
  587. <td>(</td>
  588. <td class="paramtype">SOCKET&#160;</td>
  589. <td class="paramname"><em>socket</em>, </td>
  590. </tr>
  591. <tr>
  592. <td class="paramkey"></td>
  593. <td></td>
  594. <td class="paramtype">char *&#160;</td>
  595. <td class="paramname"><em>topic</em>, </td>
  596. </tr>
  597. <tr>
  598. <td class="paramkey"></td>
  599. <td></td>
  600. <td class="paramtype">char *&#160;</td>
  601. <td class="paramname"><em>payload</em>&#160;</td>
  602. </tr>
  603. <tr>
  604. <td></td>
  605. <td>)</td>
  606. <td></td><td></td>
  607. </tr>
  608. </table>
  609. </div><div class="memdoc">
  610. <p>Update the queued write data for a socket in the case of QoS 0 messages. </p>
  611. <dl class="params"><dt>Parameters</dt><dd>
  612. <table class="params">
  613. <tr><td class="paramname">socket</td><td>the socket for which the operation is now complete </td></tr>
  614. <tr><td class="paramname">topic</td><td>the topic of the QoS 0 write </td></tr>
  615. <tr><td class="paramname">payload</td><td>the payload of the QoS 0 write </td></tr>
  616. </table>
  617. </dd>
  618. </dl>
  619. <dl class="section return"><dt>Returns</dt><dd>pointer to the updated queued data structure, or NULL </dd></dl>
  620. <div class="dynheader">
  621. Here is the call graph for this function:</div>
  622. <div class="dyncontent">
  623. <div class="center"><img src="SocketBuffer_8c_a7ba9075e011f49302304ce7b2d8e5b59_cgraph.png" border="0" usemap="#SocketBuffer_8c_a7ba9075e011f49302304ce7b2d8e5b59_cgraph" alt=""/></div>
  624. <map name="SocketBuffer_8c_a7ba9075e011f49302304ce7b2d8e5b59_cgraph" id="SocketBuffer_8c_a7ba9075e011f49302304ce7b2d8e5b59_cgraph">
  625. <area shape="rect" title="Update the queued write data for a socket in the case of QoS 0 messages." alt="" coords="5,31,179,57"/>
  626. <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="261,5,355,32"/>
  627. <area shape="rect" href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5" title="List callback function for comparing pending_writes by socket." alt="" coords="227,56,389,83"/>
  628. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="437,5,556,32"/>
  629. </map>
  630. </div>
  631. </div>
  632. </div>
  633. <a id="ae8667990c5933c3af9b90a163bba34dc"></a>
  634. <h2 class="memtitle"><span class="permalink"><a href="#ae8667990c5933c3af9b90a163bba34dc">&#9670;&nbsp;</a></span>SocketBuffer_writeComplete()</h2>
  635. <div class="memitem">
  636. <div class="memproto">
  637. <table class="memname">
  638. <tr>
  639. <td class="memname">int SocketBuffer_writeComplete </td>
  640. <td>(</td>
  641. <td class="paramtype">SOCKET&#160;</td>
  642. <td class="paramname"><em>socket</em></td><td>)</td>
  643. <td></td>
  644. </tr>
  645. </table>
  646. </div><div class="memdoc">
  647. <p>A socket write has now completed so we can get rid of the queue. </p>
  648. <dl class="params"><dt>Parameters</dt><dd>
  649. <table class="params">
  650. <tr><td class="paramname">socket</td><td>the socket for which the operation is now complete </td></tr>
  651. </table>
  652. </dd>
  653. </dl>
  654. <dl class="section return"><dt>Returns</dt><dd>completion code, boolean - was the queue removed? </dd></dl>
  655. <div class="dynheader">
  656. Here is the call graph for this function:</div>
  657. <div class="dyncontent">
  658. <div class="center"><img src="SocketBuffer_8c_ae8667990c5933c3af9b90a163bba34dc_cgraph.png" border="0" usemap="#SocketBuffer_8c_ae8667990c5933c3af9b90a163bba34dc_cgraph" alt=""/></div>
  659. <map name="SocketBuffer_8c_ae8667990c5933c3af9b90a163bba34dc_cgraph" id="SocketBuffer_8c_ae8667990c5933c3af9b90a163bba34dc_cgraph">
  660. <area shape="rect" title="A socket write has now completed so we can get rid of the queue." alt="" coords="5,31,192,57"/>
  661. <area shape="rect" href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d" title="Removes and frees an element in a list by comparing the content." alt="" coords="262,5,381,32"/>
  662. <area shape="rect" href="SocketBuffer_8c.html#a39f1ee9c98bc12a7be4d7a40b03550d5" title="List callback function for comparing pending_writes by socket." alt="" coords="240,56,403,83"/>
  663. <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="451,5,532,32"/>
  664. <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="580,5,675,32"/>
  665. <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="723,5,841,32"/>
  666. </map>
  667. </div>
  668. </div>
  669. </div>
  670. <a id="acebc1cbb93be4588f33b04ed404f6dbf"></a>
  671. <h2 class="memtitle"><span class="permalink"><a href="#acebc1cbb93be4588f33b04ed404f6dbf">&#9670;&nbsp;</a></span>socketcompare()</h2>
  672. <div class="memitem">
  673. <div class="memproto">
  674. <table class="memname">
  675. <tr>
  676. <td class="memname">int socketcompare </td>
  677. <td>(</td>
  678. <td class="paramtype">void *&#160;</td>
  679. <td class="paramname"><em>a</em>, </td>
  680. </tr>
  681. <tr>
  682. <td class="paramkey"></td>
  683. <td></td>
  684. <td class="paramtype">void *&#160;</td>
  685. <td class="paramname"><em>b</em>&#160;</td>
  686. </tr>
  687. <tr>
  688. <td></td>
  689. <td>)</td>
  690. <td></td><td></td>
  691. </tr>
  692. </table>
  693. </div><div class="memdoc">
  694. <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing socket_queues by socket. </p>
  695. <dl class="params"><dt>Parameters</dt><dd>
  696. <table class="params">
  697. <tr><td class="paramname">a</td><td>first integer value </td></tr>
  698. <tr><td class="paramname">b</td><td>second integer value </td></tr>
  699. </table>
  700. </dd>
  701. </dl>
  702. <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
  703. </div>
  704. </div>
  705. </div><!-- contents -->
  706. <!-- start footer part -->
  707. <hr class="footer"/><address class="footer"><small>
  708. 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">
  709. <img class="footer" src="doxygen.png" alt="doxygen"/>
  710. </a> 1.8.17
  711. </small></address>
  712. </body>
  713. </html>