0.0.4 • Published 3 years ago
tm-fork-ipcbus v0.0.4
tm-fork-ipcbus
Node fork inter process communication bus. Allow communucation between parent and child processes in async request/response way.
Installation
npm install tm-fork-ipcbus
Test
npm testnpm run test: coverageTests with a coverage report.
Available options
You can pass options with an options object to the constructor.
const IpcBus = require('tm-fork-ipcbus');
const ipc = new IpcBus(options);requestTimeoutTimeot in msecs for requests(default 5000 msecs).processFor parent process it should be a link to the child process. For child processes this option should be omitted.Methods
request
- response
- event
- task
- message
Events.
Each bus instance is an event emitter with the following events:
- request
- response
- event
- task
- message
- invalidMessage