Lightweight pipe-based IPC for Bare.
npm i bare-ipc
Returns a pair of IPCPorts for use constructing the IPC duplex stream based on
bare-pipe.
Returns a duplex stream using the provided port. See streamx's Duplex for Duplex API.
Increase the reference count for the IPC to keep the event loop alive.
A common pattern is to ipc.ref() on Bare.on('resume') and ipc.unref() on
suspend like so:
Bare.on('suspend', () => ipc.unref()).on('resume', () => ipc.ref())Decrease the reference count for the IPC to allow the event loop to exit.
See ipc.ref() for common pattern to keep the event loop alive.
The arguments are:
incomingis the read file handleoutgoingis the write file handle
Returns an IPC connected to the port.
A boolean for whether the port is detached.
Apache-2.0