mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
122
This commit is contained in:
@@ -41,23 +41,3 @@ void wsPublishData(String topic, String data) {
|
||||
data = "[" + topic + "]" + data;
|
||||
ws.textAll(data);
|
||||
}
|
||||
|
||||
// void sendDataWs(AsyncWebSocketClient* client) {
|
||||
// // DynamicJsonBuffer jsonBuffer;
|
||||
// // JsonObject& root = jsonBuffer.createObject();
|
||||
// // root["a"] = "abc";
|
||||
// // root["b"] = "abcd";
|
||||
// // root["c"] = "abcde";
|
||||
// // root["d"] = "abcdef";
|
||||
// // root["e"] = "abcdefg";
|
||||
// // size_t len = root.measureLength();
|
||||
// AsyncWebSocketMessageBuffer* buffer = ws.makeBuffer(len); // creates a buffer (len + 1) for you.
|
||||
// if (buffer) {
|
||||
// root.printTo((char*)buffer->get(), len + 1);
|
||||
// if (client) {
|
||||
// client->text(buffer);
|
||||
// } else {
|
||||
// ws.textAll(buffer);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user