Version 0.8.47
This commit is contained in:
parent
3f518e6998
commit
ba7ab1cda4
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.8.46",
|
||||
"version": "0.8.47",
|
||||
"keywords": [
|
||||
"Remote Device Management",
|
||||
"Remote Device Monitoring",
|
||||
|
|
|
@ -1 +1 @@
|
|||
var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.trace=!1,o.xxStateChange=function(e,t){var n;o.State!=e&&(n=o.State,o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t))},o.Start=function(){var e;0==o.connectstate&&(o.connectstate=0,e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:""),o.authCookie&&""!=o.authCookie&&(e+="?auth="+o.authCookie),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3))},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);o.trace&&console.log("RECV",t),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&(o.trace&&"ping"!=e.action&&console.log("SEND",e),o.socket.send(JSON.stringify(e)))},o}
|
||||
var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.xxStateChange=function(e,t){var n;o.State!=e&&(n=o.State,o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t))},o.Start=function(){var e;0==o.connectstate&&(o.connectstate=0,e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:""),o.authCookie&&""!=o.authCookie&&(e+="?auth="+o.authCookie),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3))},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);1==o.trace?console.log("RECV",t):2==o.trace&&console.log("RECV",JSON.stringify(t)),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&("ping"!=e.action&&(1==o.trace?console.log("SEND",e):2==o.trace&&console.log("SEND",JSON.stringify(e))),o.socket.send(JSON.stringify(e)))},o}
|
Loading…
Reference in New Issue