Version of niMQTT library which includes separate process for pings and ability to publish retained messages.

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of niMQTT by Juan Carlos Jimenez

Revision:
5:3d21020a2826
Parent:
4:afbc7b066cff
Child:
6:661892e00fe1
--- a/niMQTT.cpp	Mon Aug 12 15:30:04 2013 +0000
+++ b/niMQTT.cpp	Mon Aug 12 15:31:55 2013 +0000
@@ -58,9 +58,9 @@
     if (debug) printf("Received 0x%x\r\n", header_received);
 
     waiting_new_packet = false;
-    bool DUP = ((header_received & 4) == 4);
-    int QoS = (header_received & 6);
-    bool RETAIN = ((header_received & 1) == 1);
+    //bool DUP = ((header_received & 4) == 4);
+    //int QoS = (header_received & 6);
+    //bool RETAIN = ((header_received & 1) == 1);
 
     switch (header_received & 0xf0) {
         case CONNACK: connack(); break;
@@ -254,7 +254,7 @@
         return -2;
     }
 
-    char command = (unsub) ? UNSUBACK : SUBACK; // TODO
+    //char command = (unsub) ? UNSUBACK : SUBACK;
 
     int remaining_length = decode_remaining_length();