mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved UTF8 support on the server
This commit is contained in:
parent
3dafa39e79
commit
b41eb7fb55
14 changed files with 41 additions and 111 deletions
|
@ -166,7 +166,12 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) {
|
|||
//console.log("xxOnSocketData", rstr2hex(data));
|
||||
return obj.m.ProcessData(data);
|
||||
}
|
||||
|
||||
|
||||
obj.sendText = function (x) {
|
||||
if (typeof x != 'string') { x = JSON.stringify(x); } // Turn into a string if needed
|
||||
obj.send(encode_utf8(x)); // Encode UTF8 correctly
|
||||
}
|
||||
|
||||
obj.send = function (x) {
|
||||
//obj.debug("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + rstr2hex(x));
|
||||
//console.log("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + ((typeof x == 'string')?x:rstr2hex(x)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue