node-simple-ipc
Version:
A Node.Js module for local Inter Process Communication
26 lines • 768 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FakeIpc = exports.FakeIpcProcess = void 0;
const events_1 = require("events");
class FakeIpcProcess extends events_1.EventEmitter {
constructor(sendCallback) {
super();
this.sendCallback = sendCallback;
}
send(data) {
return this.sendCallback(data);
}
}
exports.FakeIpcProcess = FakeIpcProcess;
class FakeIpc {
constructor() {
this.master = new FakeIpcProcess((data) => {
return this.child.emit('message', data);
});
this.child = new FakeIpcProcess((data) => {
return this.master.emit('message', data);
});
}
}
exports.FakeIpc = FakeIpc;
//# sourceMappingURL=fake-proc-ipc.js.map