37 lines
636 B
C++
37 lines
636 B
C++
#ifndef TOON_WEBSOCKETSUBSCRIPTION_H
|
|
#define TOON_WEBSOCKETSUBSCRIPTION_H
|
|
|
|
#include "ToonSettings.h"
|
|
#include <HttpClient.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
namespace ToonBridge {
|
|
namespace Toon {
|
|
|
|
class WebSocketSubscription
|
|
{
|
|
public:
|
|
WebSocketSubscription(const ToonSettings& toonSettings);
|
|
~WebSocketSubscription();
|
|
|
|
void Reconnect();
|
|
|
|
private:
|
|
void OpenWebSocket();
|
|
void WebSocketStatus();
|
|
void CloseWebSocket();
|
|
|
|
std::vector<std::string> RequestHeaders();
|
|
|
|
private:
|
|
Http::HttpClient m_httpClient;
|
|
ToonSettings m_toonSettings;
|
|
};
|
|
|
|
} // namespace Toon
|
|
} // namespace ToonBridge
|
|
|
|
#endif // TOON_WEBSOCKETSUBSCRIPTION_H
|