1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-11-28 04:13:16 +00:00

Changes to support keeping multiple Browser Clients in sync

This commit is contained in:
MartinMueller2003
2023-11-09 11:06:44 -05:00
parent 85ccff0ee0
commit 00841ce32d
8 changed files with 81 additions and 86 deletions

View File

@@ -49,14 +49,19 @@ protected:
bool SendClientNotification(ClientUpdateType_t value);
private:
uint32_t CurrentSyncID = 0;
uint32_t NextSyncID = 0;
public:
ESPUIclient(AsyncWebSocketClient * _client);
ESPUIclient(const ESPUIclient & source);
virtual ~ESPUIclient();
void NotifyClient(ClientUpdateType_t value);
void onWsEvent(AwsEventType type, void* arg, uint8_t* data, size_t len);
bool onWsEvent(AwsEventType type, void* arg, uint8_t* data, size_t len);
bool IsSyncronized();
uint32_t id() { return client->id(); }
void SetState(ClientUpdateType_t value);
bool SendJsonDocToWebSocket(ArduinoJson::DynamicJsonDocument& document);
};