UI mods to display stats

This commit is contained in:
kasmtech
2020-09-28 09:43:59 +00:00
parent d031c2182f
commit 88a9bed022
4 changed files with 63 additions and 1 deletions

View File

@@ -457,6 +457,10 @@ export default class RFB extends EventTargetMixin {
RFB.messages.clientCutText(this._sock, text);
}
requestBottleneckStats() {
RFB.messages.requestStats(this._sock);
}
// ===== PRIVATE METHODS =====
_connect() {
@@ -1504,6 +1508,9 @@ export default class RFB extends EventTargetMixin {
console.log("Received KASM bottleneck stats:");
console.log(text);
this.dispatchEvent(new CustomEvent(
"bottleneck_stats",
{ detail: { text: text } }));
return true;
}
@@ -2128,6 +2135,8 @@ RFB.messages = {
const buff = sock._sQ;
const offset = sock._sQlen;
if (buff == null) { return; }
buff[offset] = 178; // msg-type
buff[offset + 1] = 0; // padding