change MQTTEthernet.h of MQTT library
Fork of MQTT by
Embed:
(wiki syntax)
Show/hide line numbers
MQTTEthernet.h
00001 00002 #if !defined(MQTTETHERNET_H) 00003 #define MQTTETHERNET_H 00004 00005 #include "MQTTmbed.h" 00006 #include "EthernetInterface.h" 00007 #include "MQTTSocket.h" 00008 00009 class MQTTEthernet : public MQTTSocket 00010 { 00011 public: 00012 MQTTEthernet() 00013 { 00014 // eth.init(); // Use DHCP 00015 // eth.connect(); 00016 } 00017 00018 EthernetInterface& getEth() 00019 { 00020 return eth; 00021 } 00022 void start(){ 00023 eth.init(); // Use DHCP 00024 eth.connect(); 00025 } 00026 void reconnect() 00027 { 00028 eth.connect(); // nothing I've tried actually works to reconnect 00029 } 00030 00031 private: 00032 00033 EthernetInterface eth; 00034 00035 }; 00036 00037 00038 #endif
Generated on Sat Jul 30 2022 04:31:28 by 1.7.2