thermferm/websocket.c

changeset 676
09b5efe0c633
parent 675
825210ba2707
child 678
cc49115e769e
--- a/thermferm/websocket.c	Sat Apr 13 16:50:26 2024 +0200
+++ b/thermferm/websocket.c	Sun Apr 14 12:46:02 2024 +0200
@@ -75,6 +75,7 @@
 		ws_clients++;
 		pss->ringbuffer_tail = ringbuffer_head;
                 pss->wsi = wsi;
+		syslog(LOG_NOTICE, "Websocket: new client, now %d", ws_clients);
 		break;
 	}
 
@@ -115,7 +116,7 @@
 
 		memcpy(buf, in, len);
 		buf[len] = '\0';
-		// syslog(LOG_NOTICE, "ws: reveived %ld bytes %s", len, buf);
+		 syslog(LOG_NOTICE, "ws: reveived %ld bytes %s", len, buf);
 		/*
 		 * These are send by bmsapp to bmsd. Then bmsd resends these via MQTT.
 		 * Do we want to change that? Or use it for the new web pages.
@@ -136,6 +137,7 @@
 
 	case LWS_CALLBACK_CLOSED:
 		ws_clients--;
+		syslog(LOG_NOTICE, "Websocket: del client, now %d", ws_clients);
 		break;
 
 	default:

mercurial