mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added browser ping/pong settings.
This commit is contained in:
parent
ffa4a16551
commit
b96ababf0b
3 changed files with 16 additions and 0 deletions
|
@ -46,6 +46,7 @@ var MeshServerCreateControl = function (domain, authCookie) {
|
|||
var message;
|
||||
try { message = JSON.parse(e.data); } catch (e) { return; }
|
||||
if ((typeof message != 'object') || (message.action == 'pong')) { return; }
|
||||
if (message.action == 'ping') { obj.send({ action: 'pong' }); }
|
||||
if (message.action == 'close') { if (message.msg) { console.log(message.msg); } obj.Stop(message.cause); return; }
|
||||
if (obj.trace) { console.log('RECV', message); }
|
||||
if (obj.onMessage) obj.onMessage(obj, message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue