An API for using MQTT over multiple transports

Dependencies:   FP MQTTPacket

Dependents:   Cellular_HelloMQTT IoTStarterKit GSwifiInterface_HelloMQTT IBMIoTClientEthernetExample ... more

This library is part of the EclipseTM Paho project; specifically the embedded client.

The goals of this API are:

  1. to be independent of any system library: hence templates parameters for networking, timer and threading classes
  2. not to rely on heap storage, only automatic (I think this is a good thing)
  3. to limit memory use, for instance by defining the size of the buffers and arrays used at object creation time
Revision:
36:2f1ada427e56
Parent:
31:a51dd239b78e
Child:
43:21da1f744243
diff -r 063dc3b472d5 -r 2f1ada427e56 MQTTSocket.h
--- a/MQTTSocket.h	Fri Aug 01 13:13:35 2014 +0000
+++ b/MQTTSocket.h	Fri Aug 01 14:45:25 2014 +0000
@@ -13,16 +13,16 @@
         return mysock.connect(hostname, port);
     }
 
-    int read(char* buffer, int len, int timeout)
+    int read(unsigned char* buffer, int len, int timeout)
     {
         mysock.set_blocking(false, timeout);  
-        return mysock.receive(buffer, len);
+        return mysock.receive((char*)buffer, len);
     }
     
-    int write(char* buffer, int len, int timeout)
+    int write(unsigned char* buffer, int len, int timeout)
     {
         mysock.set_blocking(false, timeout);  
-        return mysock.send(buffer, len);
+        return mysock.send((char*)buffer, len);
     }
     
     int disconnect()