mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added remote desktop metadata support.
This commit is contained in:
parent
b96ababf0b
commit
139a5ad174
9 changed files with 1198 additions and 1099 deletions
|
@ -12,7 +12,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
obj.meshserver = meshserver;
|
||||
obj.authCookie = authCookie;
|
||||
obj.rauthCookie = rauthCookie;
|
||||
obj.State = 0;
|
||||
obj.State = 0; // 0 = Disconnected, 1 = Connected, 2 = Connected to server, 3 = End-to-end connection.
|
||||
obj.nodeid = null;
|
||||
obj.options = null;
|
||||
obj.socket = null;
|
||||
|
@ -35,6 +35,10 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
obj.consoleMessage = null;
|
||||
obj.onConsoleMessageChange = null;
|
||||
|
||||
// Session Metadata
|
||||
obj.metadata = null;
|
||||
obj.onMetadataChange = null;
|
||||
|
||||
// Private method
|
||||
//obj.debug = function (msg) { console.log(msg); }
|
||||
|
||||
|
@ -74,6 +78,9 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', controlMsg); }
|
||||
if (controlMsg.type == 'console') {
|
||||
obj.setConsoleMessage(controlMsg.msg, controlMsg.msgid, controlMsg.msgargs, controlMsg.timeout);
|
||||
} else if (controlMsg.type == 'metadata') {
|
||||
obj.metadata = controlMsg;
|
||||
if (obj.onMetadataChange) obj.onMetadataChange(obj.metadata);
|
||||
} else if ((controlMsg.type == 'rtt') && (typeof controlMsg.time == 'number')) {
|
||||
obj.latency.current = (new Date().getTime()) - controlMsg.time;
|
||||
if (obj.latency.callbacks != null) { obj.latency.callback(obj.latency.current); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue