mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-03-30 17:02:12 +02:00
up
This commit is contained in:
parent
9ccc2d4ff5
commit
8c51e1a518
24 changed files with 1285 additions and 405 deletions
10
src/WResp.h
10
src/WResp.h
|
|
@ -1,6 +1,7 @@
|
|||
#include <WebServer.h>
|
||||
#include <WebSocketsServer.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include "Somfy.h"
|
||||
#ifndef wresp_h
|
||||
#define wresp_h
|
||||
|
|
@ -63,6 +64,15 @@ class JsonResponse : public JsonFormatter {
|
|||
void endResponse();
|
||||
void send();
|
||||
};
|
||||
class AsyncJsonResp : public JsonFormatter {
|
||||
protected:
|
||||
void _safecat(const char *val, bool escape = false) override;
|
||||
AsyncResponseStream *_stream = nullptr;
|
||||
public:
|
||||
void beginResponse(AsyncWebServerRequest *request, char *buff, size_t buffSize);
|
||||
void endResponse();
|
||||
void flush();
|
||||
};
|
||||
class JsonSockEvent : public JsonFormatter {
|
||||
protected:
|
||||
bool _closed = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue