change MQTTEthernet.h of MQTT library

Dependencies:   FP MQTTPacket

Dependents:   mbed

Fork of MQTT by MQTT

Committer:
weiarm2015
Date:
Wed Dec 02 01:49:27 2015 +0000
Revision:
47:6769c1de66d6
Parent:
43:21da1f744243
change MQTTEthernet.h of MQTT library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
icraggs 29:833386b16f3e 1
icraggs 29:833386b16f3e 2 #if !defined(MQTTETHERNET_H)
icraggs 29:833386b16f3e 3 #define MQTTETHERNET_H
icraggs 29:833386b16f3e 4
icraggs 43:21da1f744243 5 #include "MQTTmbed.h"
icraggs 29:833386b16f3e 6 #include "EthernetInterface.h"
icraggs 31:a51dd239b78e 7 #include "MQTTSocket.h"
icraggs 29:833386b16f3e 8
icraggs 31:a51dd239b78e 9 class MQTTEthernet : public MQTTSocket
icraggs 29:833386b16f3e 10 {
icraggs 29:833386b16f3e 11 public:
icraggs 29:833386b16f3e 12 MQTTEthernet()
icraggs 29:833386b16f3e 13 {
weiarm2015 47:6769c1de66d6 14 // eth.init(); // Use DHCP
weiarm2015 47:6769c1de66d6 15 // eth.connect();
icraggs 29:833386b16f3e 16 }
icraggs 29:833386b16f3e 17
icraggs 41:b7e86fa6dbb8 18 EthernetInterface& getEth()
icraggs 41:b7e86fa6dbb8 19 {
icraggs 41:b7e86fa6dbb8 20 return eth;
icraggs 41:b7e86fa6dbb8 21 }
weiarm2015 47:6769c1de66d6 22 void start(){
weiarm2015 47:6769c1de66d6 23 eth.init(); // Use DHCP
weiarm2015 47:6769c1de66d6 24 eth.connect();
weiarm2015 47:6769c1de66d6 25 }
icraggs 41:b7e86fa6dbb8 26 void reconnect()
icraggs 41:b7e86fa6dbb8 27 {
icraggs 41:b7e86fa6dbb8 28 eth.connect(); // nothing I've tried actually works to reconnect
icraggs 41:b7e86fa6dbb8 29 }
icraggs 41:b7e86fa6dbb8 30
icraggs 29:833386b16f3e 31 private:
icraggs 29:833386b16f3e 32
icraggs 29:833386b16f3e 33 EthernetInterface eth;
icraggs 29:833386b16f3e 34
icraggs 29:833386b16f3e 35 };
icraggs 29:833386b16f3e 36
icraggs 29:833386b16f3e 37
icraggs 29:833386b16f3e 38 #endif