diff --git a/libraries/networking/src/MessagesClient.h b/libraries/networking/src/MessagesClient.h index 255487f0bb..f3f9387566 100644 --- a/libraries/networking/src/MessagesClient.h +++ b/libraries/networking/src/MessagesClient.h @@ -24,11 +24,11 @@ #include "ReceivedMessage.h" /**jsdoc - *
The Messages API enables text and data to be sent between scripts over named "channels". A channel can have an arbitrary - * name to help separate messaging between different sets of scripts.
+ *The Messages
API enables text and data to be sent between scripts over named "channels". A channel can have
+ * an arbitrary name to help separate messaging between different sets of scripts.
Note: If you want to call a function in another script, you should use one of the following rather than - * sending a message:
+ *Note: To call a function in another script, you should use one of the following rather than sending a + * message:
*localOnly
set to
- * true
.
+ * Sends a text message locally on a channel.
+ * This is the same as calling {@link Messages.sendMessage|sendMessage} with localOnly == true
.
* @function Messages.sendLocalMessage
* @param {string} channel - The channel to send the message on.
* @param {string} message - The message to send.
@@ -100,10 +99,10 @@ public:
Q_INVOKABLE void sendLocalMessage(QString channel, QString message);
/**jsdoc
- * Send a data message on a channel.
+ * Sends a data message on a channel.
* @function Messages.sendData
* @param {string} channel - The channel to send the data on.
- * @param {object} data - The data to send. The data is handled as a byte stream, for example as may be provided via a
+ * @param {object} data - The data to send. The data is handled as a byte stream, for example, as may be provided via a
* JavaScript Int8Array
object.
* @param {boolean} [localOnly=false] - If false
then the message is sent to all Interface, client entity,
* server entity, and assignment client scripts in the domain.true
if the message was sent with localOnly = true
.
+ * @param {boolean} localOnly - true
if the message was sent with localOnly == true
.
* @returns {Signal}
*/
void messageReceived(QString channel, QString message, QUuid senderUUID, bool localOnly);
@@ -186,15 +185,14 @@ signals:
/**jsdoc
* Triggered when a data message is received.
* @function Messages.dataReceived
- * @param {string} channel - The channel that the message was sent on. You can use this to filter out messages not relevant
+ * @param {string} channel - The channel that the message was sent on. This can be used to filter out messages not relevant
* to your script.
- * @param {object} data - The data received. The data is handled as a byte stream, for example as may be used by a
+ * @param {object} data - The data received. The data is handled as a byte stream, for example, as may be used by a
* JavaScript Int8Array
object.
* @param {Uuid} senderID - The UUID of the sender: the user's session UUID if sent by an Interface or client entity
* script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client
- * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client
* instance if sent by an assignment client script.
- * @param {boolean} localOnly - true
if the message was sent with localOnly = true
.
+ * @param {boolean} localOnly - true
if the message was sent with localOnly == true
.
* @returns {Signal}
*/
void dataReceived(QString channel, QByteArray data, QUuid senderUUID, bool localOnly);