BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
MqttClient.h
1 #pragma once
2 
3 #include <Poco/SharedPtr.h>
4 #include <Poco/Timespan.h>
5 
6 #include "net/MqttMessage.h"
7 
8 namespace BeeeOn {
9 
10 class MqttClient {
11 public:
12  typedef Poco::SharedPtr<MqttClient> Ptr;
13 
14  virtual ~MqttClient();
15 
19  virtual void publish(const MqttMessage &msg) = 0;
20 
34  virtual MqttMessage receive(const Poco::Timespan &timeout) = 0;
35 };
36 
37 }
Definition: MqttClient.h:10
Definition: MqttMessage.h:7
virtual void publish(const MqttMessage &msg)=0
Publish a message on the topic included in the message.
virtual MqttMessage receive(const Poco::Timespan &timeout)=0