The MQTTEthernet.h and MQTTSocket.h file is changed for W7500.

Dependencies:   FP MQTTPacket

Fork of MQTT by Bohyun Bang

MQTTEthernet.h

Committer:
icraggs
Date:
2014-09-29
Revision:
43:21da1f744243
Parent:
41:b7e86fa6dbb8
Child:
45:b7cebc104c6c

File content as of revision 43:21da1f744243:


#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