mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Much improved MeshAgent and javascript module support.
This commit is contained in:
parent
3ca77afac3
commit
66bb176a12
18 changed files with 291 additions and 46 deletions
|
@ -28,6 +28,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
var agentUpdateBlockSize = 65520;
|
||||
obj.remoteaddr = obj.ws._socket.remoteAddress;
|
||||
if (obj.remoteaddr.startsWith('::ffff:')) { obj.remoteaddr = obj.remoteaddr.substring(7); }
|
||||
ws._socket.setKeepAlive(true, 0); // Set TCP keep alive
|
||||
|
||||
// Send a message to the mesh agent
|
||||
obj.send = function (data) { try { if (typeof data == 'string') { obj.ws.send(new Buffer(data, 'binary')); } else { obj.ws.send(data); } } catch (e) { } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue