Updated FreeBSD agent.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-14 03:08:53 -07:00
parent a793685e1f
commit 8feb68b72a
4 changed files with 11 additions and 5 deletions

Binary file not shown.

View File

@ -1912,8 +1912,8 @@ function createMeshCore(agent) {
if (sdp != null) { ws.write({ type: 'answer', ctrlChannel: '102938', sdp: sdp }); }
break;
}
case 'latency': {
ws.write({ type: 'latency', ctrlChannel: '102938', time: obj.time });
case 'rtt': {
ws.write({ type: 'rtt', ctrlChannel: '102938', time: obj.time });
break;
}
}

View File

@ -74,7 +74,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
if (controlMsg.type == 'console') {
obj.consoleMessage = controlMsg.msg;
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); }
} else if ((controlMsg.type = 'latency') && (typeof controlMsg.time == 'number')) {
} 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); }
} else if (obj.webrtc != null) {
@ -95,7 +95,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
function performWebRtcSwitch() {
if ((obj.webSwitchOk == true) && (obj.webRtcActive == true)) {
obj.latency.current = -1;
obj.latency.current = -1; // RTT will no longer be calculated when WebRTC is enabled
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc0"}'); // Indicate to the meshagent that it can start traffic switchover
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc1"}'); // Indicate to the meshagent that data traffic will no longer be sent over websocket.
// TODO: Hold/Stop sending data over websocket
@ -178,7 +178,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
// Request RTT mesure, don't use this if WebRTC is active
if (obj.webRtcActive != true) {
var ticks = new Date().getTime();
if ((obj.latency.lastSend == null) || ((ticks - obj.latency.lastSend) > 5000)) { obj.latency.lastSend = ticks; obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"latency","time":' + ticks + '}'); }
if ((obj.latency.lastSend == null) || ((ticks - obj.latency.lastSend) > 5000)) { obj.latency.lastSend = ticks; obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"rtt","time":' + ticks + '}'); }
}
};

View File

@ -7555,6 +7555,12 @@
"default.handlebars->27->487"
]
},
{
"en": "Desktop Session Latency",
"xloc": [
"default.handlebars->container->column_l->p11->deskarea0->deskarea4->1"
]
},
{
"cs": "Panel nástrojů na ploše",
"de": "Desktop-Werkzeugleiste",