Update to version 3.9.6

This commit is contained in:
2026-02-10 12:34:12 +01:00
parent 2617252395
commit c98a476228
94 changed files with 4593 additions and 1434 deletions

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright 2016-2025 Hristo Gochkov, Mathieu Carbou, Emil Muratov
// Copyright 2016-2026 Hristo Gochkov, Mathieu Carbou, Emil Muratov, Will Miles
//
// WebSocket example using the easy to use AsyncWebSocketMessageHandler handler that only supports unfragmented messages
@@ -40,7 +40,7 @@ static const char *htmlContent PROGMEM = R"(
</head>
<body>
<h1>WebSocket Example</h1>
<>Open your browser console!</p>
<p>Open your browser console!</p>
<input type="text" id="message" placeholder="Type a message">
<button onclick='sendMessage()'>Send</button>
<script>
@@ -71,7 +71,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent);
void setup() {
Serial.begin(115200);
#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI
#if ASYNCWEBSERVER_WIFI_SUPPORTED
WiFi.mode(WIFI_AP);
WiFi.softAP("esp-captive");
#endif
@@ -97,6 +97,7 @@ void setup() {
wsHandler.onMessage([](AsyncWebSocket *server, AsyncWebSocketClient *client, const uint8_t *data, size_t len) {
Serial.printf("Client %" PRIu32 " data: %s\n", client->id(), (const char *)data);
server->textAll(data, len);
});
wsHandler.onFragment([](AsyncWebSocket *server, AsyncWebSocketClient *client, const AwsFrameInfo *frameInfo, const uint8_t *data, size_t len) {