This commit is contained in:
Patrick Haßel 2025-06-06 12:58:18 +02:00
parent 1e304979c5
commit c81ca008cf
5 changed files with 48 additions and 48 deletions

View File

@ -12,10 +12,10 @@ AsyncWebSocket ws("/ws");
void onWebSocketEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, const AwsEventType type, void *arg, const uint8_t *data, const size_t len) {
if (type == WS_EVT_CONNECT) {
Serial.printf("[%-8s] Connected: %s\n", "WEBSOCKET", client->remoteIP().toString().c_str());
Serial.printf("[%-9s] Connected: %s\n", "WEBSOCKET", client->remoteIP().toString().c_str());
client->text(stateBuffer);
} else if (type == WS_EVT_DISCONNECT) {
Serial.printf("[%-8s] Disconnected: %s\n", "WEBSOCKET", client->remoteIP().toString().c_str());
Serial.printf("[%-9s] Disconnected: %s\n", "WEBSOCKET", client->remoteIP().toString().c_str());
}
}