Skip to content

Remote procedure calls between JS objects over the Electron IPC mechanism

Notifications You must be signed in to change notification settings

benbucksch/jpc-electron-ipc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Remote procedure calls between JS objects over the Electron IPC mechanism

Resources

Stars

Watchers

Forks

Packages

No packages published