1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-24 12:13:16 +00:00

1. Updated metadata

2. Fixed compiler warning
This commit is contained in:
Bryan Roe
2020-05-21 19:06:05 -07:00
parent dd216efbe8
commit 383c19f5fe
8 changed files with 110 additions and 46 deletions

View File

@@ -52,7 +52,12 @@ function childContainer()
this._client.write(h);
this._client.write(d);
});
Object.defineProperty(ret, "descriptorMetadata", {
set: function (v)
{
if (this._client) { this._client.descriptorMetadata = v; }
}
});
ret._ipc = require('net').createServer(); ret._ipc.parent = ret;
ret._ipc.on('close', function () { console.log('Child Container Process Closed'); });
@@ -83,6 +88,7 @@ function childContainer()
var script = Buffer.from("console.log('CHILD/START');require('child-container').connect('" + ipcInteger + "');").toString('base64');
ret._ipc.once('connection', function onConnect(s)
{
s.descriptorMetadata = 'child-container';
this.parent._client = s;
this.parent._client._parent = this;
var data;
@@ -94,11 +100,6 @@ function childContainer()
data = { command: 'launch', value: { module: this.parent.options.launch.module, method: this.parent.options.launch.method, args: this.parent.options.launch.args } };
this.parent.send(data);
s.once('close', function ()
{
console.log('close emitted');
require('MeshAgent').SendCommand({ action: 'msg', type: 'console', value: 'close emitted'});
});
s.on('data', function (c)
{
var cLen;

View File

@@ -74,6 +74,7 @@ function messageBox()
ret._ipc.master = ret;
ret._ipc.on('ready', function ()
{
this.descriptorMetadata = 'message-box';
if (this.master.timeout != null) { this.master._timeout = setTimeout(function (mstr) { mstr._ipc.exit(); }, this.master.timeout * 1000, this.master); }
if (this.master.layout == null)
{

View File

@@ -64,6 +64,7 @@ function dispatch(options)
this.parent._client._parent = this;
this.close();
var d, h = Buffer.alloc(4);
s.descriptorMetadata = 'win-dispatcher';
for (var m in this.parent.options.modules)
{