MQTT lib for WISEAgent
Fork of MQTT by
MQTTEthernet.h
- Committer:
- ericliang
- Date:
- 2015-08-12
- Revision:
- 45:bd3567993b26
- Parent:
- 43:21da1f744243
File content as of revision 45:bd3567993b26:
#if !defined(MQTTETHERNET_H)
#define MQTTETHERNET_H
#include "MQTTmbed.h"
#include "EthernetInterface.h"
#include "MQTTSocket.h"
class MQTTEthernet : public MQTTSocket
{
public:
MQTTEthernet()
{
eth.init(); // Use DHCP
eth.connect();
}
EthernetInterface& getEth()
{
return eth;
}
void reconnect()
{
eth.connect(); // nothing I've tried actually works to reconnect
}
private:
EthernetInterface eth;
};
#endif
