From 41df5cdd8b8a0194600cda86b813f7b9032acb99 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 17 Apr 2018 20:16:00 +0200 Subject: [PATCH] Update docs --- Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c | 11 ++++++----- README.md | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c b/Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c index 1afa32ce..c20aa4af 100644 --- a/Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c +++ b/Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c @@ -3,13 +3,13 @@ _mqttClient.subscribe("MQTTnet.RPC/+/ping"); _mqttClient.subscribe("MQTTnet.RPC/+/do_something"); // It is not allowed to change the structure of the topic. Otherwise RPC will not work. So method names can be separated using -// an _ or . but no +, # or /.. If it is required to distinguish between devices own rules can be defined like the following. +// an _ or . but no +, # or . If it is required to distinguish between devices own rules can be defined like the following. _mqttClient.subscribe("MQTTnet.RPC/+/deviceA.ping"); _mqttClient.subscribe("MQTTnet.RPC/+/deviceB.ping"); _mqttClient.subscribe("MQTTnet.RPC/+/deviceC.getTemperature"); -// Within the callback of the mqtt client the topic must be checked if it belongs to MQTTnet RPC. The following code shows one -// possible way. +// Within the callback of the MQTT client the topic must be checked if it belongs to MQTTnet RPC. The following code shows one +// possible way of doing this. void mqtt_Callback(char *topic, byte *payload, unsigned int payloadLength) { String topicString = String(topic); @@ -24,5 +24,6 @@ void mqtt_Callback(char *topic, byte *payload, unsigned int payloadLength) } } -// Do not send response message with the _retain_ flag set to true. -// All required data for a RPC call and the result must be placed into the payload. \ No newline at end of file +// Important notes: +// ! Do not send response message with the _retain_ flag set to true. +// ! All required data for a RPC call and the result must be placed into the payload. \ No newline at end of file diff --git a/README.md b/README.md index 6a3111d8..83a03a35 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ MQTTnet is a high performance .NET library for MQTT based communication. It prov * Performance optimized (processing ~40.000 messages / second)* * Interfaces included for mocking and testing * Access to internal trace messages -* Unit tested (70+ tests) +* Unit tested (~80 tests) \* Tested on local machine (Intel i7 8700K) with MQTTnet client and server running in the same process using the TCP channel. The app for verification is part of this repository and stored in _/Tests/MQTTnet.TestApp.NetCore_.