mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-10-01 08:40:54 +02:00
updated example
This commit is contained in:
@@ -23,6 +23,10 @@ void onWsEvent(AsyncWebSocket* server, AsyncWebSocketClient* client, AwsEventTyp
|
|||||||
Serial.printf("Client #%" PRIu32 " connected.\n", client->id());
|
Serial.printf("Client #%" PRIu32 " connected.\n", client->id());
|
||||||
} else if (type == WS_EVT_DISCONNECT) {
|
} else if (type == WS_EVT_DISCONNECT) {
|
||||||
Serial.printf("Client #%" PRIu32 " disconnected.\n", client->id());
|
Serial.printf("Client #%" PRIu32 " disconnected.\n", client->id());
|
||||||
|
} else if (type == WS_EVT_ERROR) {
|
||||||
|
Serial.printf("Client #%" PRIu32 " error.\n", client->id());
|
||||||
|
} else if (type == WS_EVT_DATA) {
|
||||||
|
Serial.printf("Client #%" PRIu32 " data: %.*s\n", client->id(), len, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user