The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.

Dependents:   Cayenne-ESP8266Interface Cayenne-WIZnet_Library Cayenne-WIZnetInterface Cayenne-X-NUCLEO-IDW01M1 ... more

Revision:
11:532406b58e8f
Parent:
0:09ef59d2d0f7
--- a/src/Platform/mbed/MQTTNetwork.h	Wed Oct 26 17:38:50 2016 -0600
+++ b/src/Platform/mbed/MQTTNetwork.h	Fri Oct 28 13:38:43 2016 -0600
@@ -73,7 +73,7 @@
     * @param[out] buffer Buffer that receives the data
     * @param[in] len Buffer length
     * @param[in] timeout_ms Timeout for the read operation, in milliseconds
-    * @return 1 for success, any other value for error
+    * @return Number of bytes read, or a negative value if there was an error
     */
     int read(unsigned char* buffer, int len, int timeout_ms) {
         _socket.set_blocking(false, timeout_ms);
@@ -85,7 +85,7 @@
     * @param[in] buffer Buffer that contains data to write
     * @param[in] len Number of bytes to write
     * @param[in] timeout_ms Timeout for the write operation, in milliseconds
-    * @return Number of bytes written on success, a negative value for error
+    * @return Number of bytes written, or a negative value if there was an error
     */
     int write(unsigned char* buffer, int len, int timeout_ms) {
         _socket.set_blocking(false, timeout_ms);