From f5d9306c3752b7b9e751ea471d244f71ff8167d7 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 7 May 2019 20:20:12 +0200 Subject: [PATCH] fix network usage --- htdocs/openwebrx.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index a5c6ee5..3efbe9b 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1154,6 +1154,8 @@ function on_ws_recv(evt) { if (typeof evt.data == 'string') { // text messages + debug_ws_data_received += evt.data.length / 1000; + if (evt.data.substr(0, 16) == "CLIENT DE SERVER") { divlog("Server acknowledged WebSocket connection."); } else { @@ -1216,6 +1218,8 @@ function on_ws_recv(evt) } } else if (evt.data instanceof ArrayBuffer) { // binary messages + debug_ws_data_received += evt.data.byteLength / 1000; + type = new Uint8Array(evt.data, 0, 1)[0] data = evt.data.slice(1)