1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved websocket speed for MSTSC.js bitmaps.

This commit is contained in:
Ylian Saint-Hilaire 2020-06-10 12:10:32 -07:00
parent 9ea93a658e
commit 14c08ce461
2 changed files with 38 additions and 27 deletions

View file

@ -84,7 +84,9 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain, u
}).on('connect', function () {
send(['rdp-connect']);
}).on('bitmap', function (bitmap) {
send(['rdp-bitmap', bitmap]);
try { ws.send(bitmap.data); } catch (ex) { } // Send the bitmap data as binary
delete bitmap.data;
send(['rdp-bitmap', bitmap]); // Send the bitmap metadata seperately, without bitmap data.
}).on('close', function () {
send(['rdp-close']);
}).on('error', function (err) {