From d936982debcf5b40969930c255095bae729a35ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 20 Mar 2021 02:36:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- socket.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/socket.html b/socket.html index a9b72163..a966f4be 100644 --- a/socket.html +++ b/socket.html @@ -29,17 +29,17 @@ format.insertBefore(div, count[0]); } - function close() { + function close(even) { setTimeout(function () { connect(); sock.onmessage = message; sock.onclose = close; }, 3000); - console.log('onClose') + console.log(even, 'onClose') } function connect() { - sock = new WebSocket('ws://47.92.194.207:9530'); + sock = new WebSocket('ws://47.92.194.207:9530?token=de5cfdf897-e2f-65de-b5686aca2-5575fe&access_token='+encodeURIComponent('ZgHcxCzVuV7kKQsf/j07N5J7BnC1VE5sS32/07utoibiLHLBXLa9htX3LMsik2DY2w0n+MUibQayG0diedcD8g==')+'&iv=iv340f0be2Fx0VvP'); sock.onopen = function () { if (tick) { clearInterval(tick)