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
Diff: src/Platform/mbed/MQTTNetworkIDW01M1.h
- Revision:
- 11:532406b58e8f
- Parent:
- 0:09ef59d2d0f7
--- a/src/Platform/mbed/MQTTNetworkIDW01M1.h Wed Oct 26 17:38:50 2016 -0600 +++ b/src/Platform/mbed/MQTTNetworkIDW01M1.h Fri Oct 28 13:38:43 2016 -0600 @@ -76,7 +76,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_timeout(timeout_ms); @@ -88,7 +88,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_timeout(timeout_ms);