This commit is contained in:
2020-09-04 00:41:33 +08:00
parent 622071256e
commit 46f9de1f6a
141 changed files with 105 additions and 73 deletions
+2 -2
View File
@@ -36,13 +36,13 @@
}
function connect() {
sock = new WebSocket('ws://127.0.0.1:9530/');
sock = new WebSocket('ws://127.0.0.1:9530/', ['chat-superchat']);
sock.onopen = function () {
if (tick) {
clearInterval(tick)
}
tick = setInterval(function () {
sock.send('tick');
sock.send(JSON.stringify({'route': 'getUserPosition', 'tick': new Date().getTime()}));
}, 3000)
}
}