mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-31 20:39:14 +03:00
сокеты
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include "сlasses/sendJson.h"
|
||||
|
||||
//базовый класс
|
||||
|
||||
SendJson::SendJson() {}
|
||||
SendJson::~SendJson() {}
|
||||
|
||||
@@ -14,8 +12,16 @@ void SendJson::sendFile(String path, uint8_t num) {
|
||||
void SendJson::loop() {
|
||||
if (file.available()) {
|
||||
String jsonArrayElement = _path + file.readStringUntil('}') + "}";
|
||||
send(jsonArrayElement, _num);
|
||||
sendWs(jsonArrayElement);
|
||||
}
|
||||
}
|
||||
|
||||
void SendJson::sendWs(String& jsonArrayElement) {
|
||||
standWebSocket.sendTXT(_num, jsonArrayElement);
|
||||
}
|
||||
|
||||
void SendJson::sendMqtt(String& jsonArrayElement) {
|
||||
// mqtt send to do
|
||||
}
|
||||
|
||||
SendJson* mySendJson;
|
||||
|
||||
Reference in New Issue
Block a user