logging
This commit is contained in:
parent
1e304979c5
commit
c81ca008cf
@ -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) {
|
void onWebSocketEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, const AwsEventType type, void *arg, const uint8_t *data, const size_t len) {
|
||||||
if (type == WS_EVT_CONNECT) {
|
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);
|
client->text(stateBuffer);
|
||||||
} else if (type == WS_EVT_DISCONNECT) {
|
} 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user