mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-08-06 22:24:39 +02:00
Fixed const getter which should be non const to access client api
This commit is contained in:
@@ -463,6 +463,10 @@ void loop() {
|
|||||||
}
|
}
|
||||||
if (now - lastWS >= deltaWS) {
|
if (now - lastWS >= deltaWS) {
|
||||||
ws.printfAll("kp%.4f", (10.0 / 3.0));
|
ws.printfAll("kp%.4f", (10.0 / 3.0));
|
||||||
|
// ws.getClients
|
||||||
|
for (auto& client : ws.getClients()) {
|
||||||
|
client.text("kp%.4f", (10.0 / 3.0));
|
||||||
|
}
|
||||||
lastWS = millis();
|
lastWS = millis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -351,7 +351,7 @@ class AsyncWebSocket : public AsyncWebHandler {
|
|||||||
AsyncWebSocketMessageBuffer* makeBuffer(size_t size = 0);
|
AsyncWebSocketMessageBuffer* makeBuffer(size_t size = 0);
|
||||||
AsyncWebSocketMessageBuffer* makeBuffer(const uint8_t* data, size_t size);
|
AsyncWebSocketMessageBuffer* makeBuffer(const uint8_t* data, size_t size);
|
||||||
|
|
||||||
const std::list<AsyncWebSocketClient>& getClients() const { return _clients; }
|
std::list<AsyncWebSocketClient>& getClients() { return _clients; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// WebServer response to authenticate the socket and detach the tcp client from the web server request
|
// WebServer response to authenticate the socket and detach the tcp client from the web server request
|
||||||
|
Reference in New Issue
Block a user