index.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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>Paho MQTT C Client Library: MQTT Client library for C (MQTTClient)</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">Paho MQTT C Client Library
  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. </div><!-- top -->
  50. <!-- window showing the filter options -->
  51. <div id="MSearchSelectWindow"
  52. onmouseover="return searchBox.OnSearchSelectShow()"
  53. onmouseout="return searchBox.OnSearchSelectHide()"
  54. onkeydown="return searchBox.OnSearchSelectKey(event)">
  55. </div>
  56. <!-- iframe showing the search results (closed by default) -->
  57. <div id="MSearchResultsWindow">
  58. <iframe src="javascript:void(0)" frameborder="0"
  59. name="MSearchResults" id="MSearchResults">
  60. </iframe>
  61. </div>
  62. <div class="PageDoc"><div class="header">
  63. <div class="headertitle">
  64. <div class="title">MQTT Client library for C (MQTTClient) </div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <div class="textblock"><p>An MQTT client library in C.&copy; Copyright 2009, 2022 IBM Corp., Ian Craggs and others</p>
  68. <p>These pages describe the original more synchronous API which might be considered easier to use. Some of the calls will block. For the new totally asynchronous API where no calls block, which is especially suitable for use in windowed environments, see the <a href="../../MQTTAsync/html/index.html">MQTT C Client Asynchronous API Documentation</a>. The MQTTClient API is not thread safe, whereas the MQTTAsync API is.</p>
  69. <p>An MQTT client application connects to MQTT-capable servers. A typical client is responsible for collecting information from a telemetry device and publishing the information to the server. It can also subscribe to topics, receive messages, and use this information to control the telemetry device.</p>
  70. <p>MQTT clients implement the published MQTT v3 protocol. You can write your own API to the MQTT protocol using the programming language and platform of your choice. This can be time-consuming and error-prone.</p>
  71. <p>To simplify writing MQTT client applications, this library encapsulates the MQTT v3 protocol for you. Using this library enables a fully functional MQTT client application to be written in a few lines of code. The information presented here documents the API provided by the MQTT Client library for C.</p>
  72. <p><b>Using the client</b><br />
  73. Applications that use the client library typically use a similar structure: </p><ul>
  74. <li>
  75. Create a client object </li>
  76. <li>
  77. Set the options to connect to an MQTT server </li>
  78. <li>
  79. Set up callback functions if multi-threaded (asynchronous mode) operation is being used (see <a class="el" href="async.html">Asynchronous vs synchronous client applications</a>). </li>
  80. <li>
  81. Subscribe to any topics the client needs to receive </li>
  82. <li>
  83. Repeat until finished: <ul>
  84. <li>
  85. Publish any messages the client needs to </li>
  86. <li>
  87. Handle any incoming messages </li>
  88. </ul>
  89. </li>
  90. <li>
  91. Disconnect the client </li>
  92. <li>
  93. Free any memory being used by the client </li>
  94. </ul>
  95. <p>Some simple examples are shown here: </p><ul>
  96. <li>
  97. <a class="el" href="pubsync.html">Synchronous publication example</a> </li>
  98. <li>
  99. <a class="el" href="pubasync.html">Asynchronous publication example</a> </li>
  100. <li>
  101. <a class="el" href="subasync.html">Asynchronous subscription example</a> </li>
  102. </ul>
  103. <p>Additional information about important concepts is provided here: </p><ul>
  104. <li>
  105. <a class="el" href="async.html">Asynchronous vs synchronous client applications</a> </li>
  106. <li>
  107. <a class="el" href="callbacks.html">Callbacks</a> </li>
  108. <li>
  109. <a class="el" href="wildcard.html">Subscription wildcards</a> </li>
  110. <li>
  111. <a class="el" href="qos.html">Quality of service</a> </li>
  112. <li>
  113. <a class="el" href="tracing.html">Tracing</a> </li>
  114. </ul>
  115. </div></div><!-- PageDoc -->
  116. </div><!-- contents -->
  117. <!-- start footer part -->
  118. <hr class="footer"/><address class="footer"><small>
  119. Generated on Thu Sep 29 2022 11:34:45 for Paho MQTT C Client Library by &#160;<a href="http://www.doxygen.org/index.html">
  120. <img class="footer" src="doxygen.png" alt="doxygen"/>
  121. </a> 1.8.17
  122. </small></address>
  123. </body>
  124. </html>