jpc-electron-ipc

0.2.2 • Public • Published

jpc-electron-ipc - Remote procedure calls between JS objects over the Electron IPC mechanism

jpc allows you to call JS objects in other processes. From your JS objects, it automatically creates an API that resembles your object API, just with an await in front of every call. It then transmits the call over the channel and call the objects in the remote process, and returns the result back to you.

See the jpc API

This uses the Electron IPC mechanism between the Electron main process and renderer process, using asynchronous communication.

Electron main process

import { JPCMainProcess } from "jpc-electron-ipc";

let jpc = new JPCMainProcess(myApp);
await jpc.init();

Electron renderer process

import { JPCRendererProcess } from "jpc-electron-ipc";

let jpc = new JPCRendererProcess();
await jpc.init();
let myApp = await jpc.getRemoteStartObject();

Package Sidebar

Install

npm i jpc-electron-ipc

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

7.45 kB

Total Files

5

Last publish

Collaborators

  • benbucksch