GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ipetrovic11/electron-rpc: Electron module allowing communication between main process and all windows at the same time.

BranchesTags
Open more actions menu

Latest commit

 

History

42 Commits
42 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
index.ts
index.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Electron RPC

Module for easy electron RPC communication between main process, workers and all windows at the same time. It is using main process as message broker and both events and messages are send and forget.

How to install

Installation

npm install @workpuls/electron-rpc --save 

In each process you have to init broker, and it is important not to forget to do the same in main process.

import { Broker } from '@workpuls/electron-rpc';
Broker.init();

Broker

Broker is used for cross-process communication.

emit - for emitting events call - calling remote function/procedure, returning promise so that function can have return value

on - action that needs to be done once event is detected handle - handling call that's done and function return is what is resolved as promise

remove - removes any handler that is registered bboth with on and handle

Action can be handled just by one process and thats either main process or window that has solved execution first. If you need multiple processes to do the same action use emit.

RemoteSubject

RemoteSubject is same as BehaviourSubject, but data is synched betweenn multiple process. If inside one precess is called .next(value), same value will be propagated to all process.

It is uniquly identified by name.

About

Electron module allowing communication between main process and all windows at the same time.

Topics

electronrpc

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.