Updated FreeBSD agent.
Ylian Saint-Hilaire committed
Apr 14, 2020 at 03:08 UTC
8feb68b72a3298649d9a9d34b9b408139520876a
4 files changed
+11
-5
agents/meshagent_freebsd_x86-64
Binary files a/agents/meshagent_freebsd_x86-64 and b/agents/meshagent_freebsd_x86-64 differ
agents/meshcore.js
+2
-2
@@ -1912,8 +1912,8 @@ function createMeshCore(agent) {
1912
if (sdp != null) { ws.write({ type: 'answer', ctrlChannel: '102938', sdp: sdp }); }
1913
break;
1914
}
1915
- case 'latency': {
1916
- ws.write({ type: 'latency', ctrlChannel: '102938', time: obj.time });
1915
+ case 'rtt': {
1916
+ ws.write({ type: 'rtt', ctrlChannel: '102938', time: obj.time });
1917
break;
1918
}
1919
}
public/scripts/agent-redir-ws-0.1.1.js
+3
-3
@@ -74,7 +74,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
74
if (controlMsg.type == 'console') {
75
obj.consoleMessage = controlMsg.msg;
76
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); }
77
- } else if ((controlMsg.type = 'latency') && (typeof controlMsg.time == 'number')) {
77
+ } else if ((controlMsg.type = 'rtt') && (typeof controlMsg.time == 'number')) {
78
obj.latency.current = (new Date().getTime()) - controlMsg.time;
79
if (obj.latency.callbacks != null) { obj.latency.callback(obj.latency.current); }
80
} else if (obj.webrtc != null) {
@@ -95,7 +95,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
95
96
function performWebRtcSwitch() {
97
if ((obj.webSwitchOk == true) && (obj.webRtcActive == true)) {
98
- obj.latency.current = -1;
98
+ obj.latency.current = -1; // RTT will no longer be calculated when WebRTC is enabled
99
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc0"}'); // Indicate to the meshagent that it can start traffic switchover
100
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc1"}'); // Indicate to the meshagent that data traffic will no longer be sent over websocket.
101
// TODO: Hold/Stop sending data over websocket
@@ -178,7 +178,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
178
// Request RTT mesure, don't use this if WebRTC is active
179
if (obj.webRtcActive != true) {
180
var ticks = new Date().getTime();
181
- if ((obj.latency.lastSend == null) || ((ticks - obj.latency.lastSend) > 5000)) { obj.latency.lastSend = ticks; obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"latency","time":' + ticks + '}'); }
181
+ if ((obj.latency.lastSend == null) || ((ticks - obj.latency.lastSend) > 5000)) { obj.latency.lastSend = ticks; obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"rtt","time":' + ticks + '}'); }
182
}
183
};
184
translate/translate.json
+6
@@ -7555,6 +7555,12 @@
7555
"default.handlebars->27->487"
7556
]
7557
},
7558
+ {
7559
+ "en": "Desktop Session Latency",
7560
+ "xloc": [
7561
+ "default.handlebars->container->column_l->p11->deskarea0->deskarea4->1"
7562
+ ]
7563
+ },
7564
{
7565
"cs": "Panel nástrojů na ploše",
7566
"de": "Desktop-Werkzeugleiste",