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.
MQTTEthernet.h
- Committer:
- icraggs
- Date:
- 2017-09-25
- Revision:
- 52:3f9919941b86
- Parent:
- 43:21da1f744243
- Child:
- 54:ff9e5c4b52d0
File content as of revision 52:3f9919941b86:
#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