Update to version 3.9.6
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user