| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <title>JSDoc: Class: Message</title> |
| |
| <script src="scripts/prettify/prettify.js"> </script> |
| <script src="scripts/prettify/lang-css.js"> </script> |
| <!--[if lt IE 9]> |
| <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
| <![endif]--> |
| <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> |
| <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> |
| </head> |
| |
| <body> |
| |
| <div id="main"> |
| |
| <h1 class="page-title">Class: Message</h1> |
| |
| |
| |
| |
| |
| |
| <section> |
| |
| <header> |
| |
| <h2><span class="attribs"><span class="type-signature"></span></span> |
| <span class="ancestors"><a href="Paho.MQTT.html">.MQTT</a>.</span>Message<span class="signature">(payload)</span><span class="type-signature"></span></h2> |
| |
| |
| </header> |
| |
| <article> |
| <div class="container-overview"> |
| |
| |
| |
| |
| |
| |
| <h4 class="name" id="Message"><span class="type-signature"></span>new Message<span class="signature">(payload)</span><span class="type-signature"></span></h4> |
| |
| |
| |
| |
| |
| |
| <div class="description"> |
| An application message, sent or received. |
| <p> |
| All attributes may be null, which implies the default values. |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <h5>Parameters:</h5> |
| |
| |
| <table class="params"> |
| <thead> |
| <tr> |
| |
| <th>Name</th> |
| |
| |
| <th>Type</th> |
| |
| |
| |
| |
| |
| <th class="last">Description</th> |
| </tr> |
| </thead> |
| |
| <tbody> |
| |
| |
| <tr> |
| |
| <td class="name"><code>payload</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">String</span> |
| | |
| |
| <span class="param-type">ArrayBuffer</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last">The message data to be sent. |
| <p></td> |
| </tr> |
| |
| |
| </tbody> |
| </table> |
| |
| |
| |
| |
| |
| |
| <h5 class="subsection-title">Properties:</h5> |
| |
| |
| |
| <table class="props"> |
| <thead> |
| <tr> |
| |
| <th>Name</th> |
| |
| |
| <th>Type</th> |
| |
| |
| |
| |
| |
| <th class="last">Description</th> |
| </tr> |
| </thead> |
| |
| <tbody> |
| |
| |
| <tr> |
| |
| <td class="name"><code>payloadString</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">string</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last"><i>read only</i> The payload as a string if the payload consists of valid UTF-8 characters.</td> |
| </tr> |
| |
| |
| |
| <tr> |
| |
| <td class="name"><code>payloadBytes</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">ArrayBuffer</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last"><i>read only</i> The payload as an ArrayBuffer. |
| <p></td> |
| </tr> |
| |
| |
| |
| <tr> |
| |
| <td class="name"><code>destinationName</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">string</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last"><b>mandatory</b> The name of the destination to which the message is to be sent |
| (for messages about to be sent) or the name of the destination from which the message has been received. |
| (for messages received by the onMessage function). |
| <p></td> |
| </tr> |
| |
| |
| |
| <tr> |
| |
| <td class="name"><code>qos</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">number</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last">The Quality of Service used to deliver the message. |
| <dl> |
| <dt>0 Best effort (default). |
| <dt>1 At least once. |
| <dt>2 Exactly once. |
| </dl> |
| <p></td> |
| </tr> |
| |
| |
| |
| <tr> |
| |
| <td class="name"><code>retained</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">Boolean</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last">If true, the message is to be retained by the server and delivered |
| to both current and future subscriptions. |
| If false the server only delivers the message to current subscribers, this is the default for new Messages. |
| A received message has the retained boolean set to true if the message was published |
| with the retained boolean set to true |
| and the subscrption was made after the message has been published. |
| <p></td> |
| </tr> |
| |
| |
| |
| <tr> |
| |
| <td class="name"><code>duplicate</code></td> |
| |
| |
| <td class="type"> |
| |
| |
| <span class="param-type">Boolean</span> |
| |
| |
| |
| </td> |
| |
| |
| |
| |
| |
| <td class="description last"><i>read only</i> If true, this message might be a duplicate of one which has already been received. |
| This is only set on messages received from the server.</td> |
| </tr> |
| |
| |
| </tbody> |
| </table> |
| |
| |
| |
| |
| <dl class="details"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dt class="tag-source">Source:</dt> |
| <dd class="tag-source"><ul class="dummy"><li> |
| <a href="paho-mqtt.js.html">paho-mqtt.js</a>, <a href="paho-mqtt.js.html#line2283">line 2283</a> |
| </li></ul></dd> |
| |
| |
| |
| |
| |
| |
| |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </article> |
| |
| </section> |
| |
| |
| |
| |
| </div> |
| |
| <nav> |
| <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Paho.MQTT.Client.html">Client</a></li><li><a href="Paho.MQTT.Message.html">Message</a></li></ul><h3>Namespaces</h3><ul><li><a href="Paho.MQTT.html">MQTT</a></li></ul> |
| </nav> |
| |
| <br class="clear"> |
| |
| <footer> |
| Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.3</a> on Fri Aug 04 2017 09:22:59 GMT+0100 (BST) |
| </footer> |
| |
| <script> prettyPrint(); </script> |
| <script src="scripts/linenumber.js"> </script> |
| </body> |
| </html> |