Add function to check if socket is connected.

Dependencies:   FP MQTTPacket

Fork of MQTT by Christoph W.

Files at this revision

API Documentation at this revision

Comitter:
walser
Date:
Thu Feb 25 13:16:45 2016 +0000
Parent:
46:e335fcc1a663
Commit message:
Add function to check if socket is connected.

Changed in this revision

MQTTSocket.h Show annotated file Show diff for this revision Revisions of this file
diff -r e335fcc1a663 -r f62dc079fc86 MQTTSocket.h
--- a/MQTTSocket.h	Tue Aug 18 09:57:19 2015 +0000
+++ b/MQTTSocket.h	Thu Feb 25 13:16:45 2016 +0000
@@ -30,6 +30,11 @@
         return mysock.close();
     }
     
+    bool isConnected()
+    {
+        return mysock.is_connected();
+    }
+    
 private:
 
     TCPSocketConnection mysock;