Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-os-example-wifi-milkcocoa MilkcocoaOsSample_Eth MilkcocoaOsSample_ESP8266 MilkcocoaOsSample_Eth_DigitalIn
MQTTInterface.h
00001 00002 #if !defined(MQTTINTERFACE_H) 00003 #define MQTTINTERFACE_H 00004 00005 #include "mbed.h" 00006 #include "MQTTmbed.h" 00007 #include "TCPSocket.h" 00008 #include "MQTTSocket.h" 00009 00010 class MQTTInterface : public MQTTSocket 00011 { 00012 public: 00013 MQTTInterface(NetworkInterface* nif) 00014 { 00015 _nif = nif; 00016 open(_nif); 00017 } 00018 00019 NetworkInterface& getEth() 00020 { 00021 return *_nif; 00022 } 00023 00024 void reconnect() 00025 { 00026 _nif->disconnect(); 00027 _nif->connect(); 00028 } 00029 00030 private: 00031 00032 NetworkInterface* _nif; 00033 00034 }; 00035 00036 00037 #endif
Generated on Tue Jul 12 2022 21:37:29 by
1.7.2