Using CyaSSL library, which is included by default with MTSAS library.

Dependencies:   FP MQTTPacket

Fork of MQTTS by Vivek Ratna Kansakar

MQTTEthernet.h

Committer:
vivekratna
Date:
2017-05-25
Revision:
49:8a88045f2b79
Parent:
43:21da1f744243

File content as of revision 49:8a88045f2b79:


#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