добавил очередь отправки файлов в сокеты

This commit is contained in:
Dmitry Borisenko
2022-01-19 22:54:33 +01:00
parent 003c130eef
commit 221ad5f5d4
14 changed files with 66 additions and 30 deletions

View File

@@ -219,8 +219,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
// очередь задавалась бы так: /widgets.json,/config.json,
// хорошая идея на завтра)
if (sendWigdetsJson) sendWigdetsJson->sendFile("/widgets.json", num);
if (sendConfigJson) sendConfigJson->sendFile("/config.json", num);
if (sendJsonFiles) sendJsonFiles->addFileToQueue("/widgets.json", num);
if (sendJsonFiles) sendJsonFiles->addFileToQueue("/config.json", num);
}
if (payloadStr.startsWith("/gifnoc.json")) { //если прилетел измененный пакет с меткой /gifnoc (config наоборот) то перепишем файл, пока переписываем целеком