Add Reconnection Timer
This commit is contained in:
+9
-1
@@ -7,7 +7,9 @@
|
||||
#include "WebSocketSubscription.h"
|
||||
#include <HttpServer.h>
|
||||
#include <MQTT.h>
|
||||
#include <Timer.h>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -26,7 +28,8 @@ private:
|
||||
void Start();
|
||||
|
||||
Http::HttpServer::HttpReply HttpCallback(const std::string& uri, const std::vector<Http::HttpPostData>& postData);
|
||||
void TimeToLiveCallback(WebSocketSubscription* pSubscription, int timeToLive);
|
||||
void ReconnectCallback(WebSocketSubscription* pSubscription);
|
||||
void CheckMessageReceived();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Http::HttpServer> m_pHttpServer;
|
||||
@@ -37,6 +40,11 @@ private:
|
||||
ToonSettings m_toonSettings;
|
||||
MQTTSettings m_mqttSettings;
|
||||
std::unique_ptr<WebSocketSubscription> m_pWebSocketSubscription;
|
||||
|
||||
Timer::Timer m_messageCheckTimer;
|
||||
|
||||
std::mutex m_mutex;
|
||||
bool m_messageReceived;
|
||||
};
|
||||
|
||||
} // namespace Toon
|
||||
|
||||
Reference in New Issue
Block a user