cc

Dependencies:   MQTTPacket FP

MQTTEthernet.h

Committer:
icraggs
Date:
2014-08-15
Revision:
41:b7e86fa6dbb8
Parent:
31:a51dd239b78e
Child:
43:21da1f744243

File content as of revision 41:b7e86fa6dbb8:


#if !defined(MQTTETHERNET_H)
#define MQTTETHERNET_H

#include "MQTT_mbed.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