
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
electron-ipc-socket
Advanced tools
Event based communication
Response-request abstraction on top of Electron IPC system.
npm install --save electron-ipc-socket
Events are good, but sometimes you want something more than just 'emit and forget'. Current package provides an abstraction on top of Electron IPC system that allows you to make 'request-response' communication.
// main-process.js
import { ipcMain, BrowserWindow } from 'electron';
import { Socket, Transport, Event, InboundRequest } from 'electron-ipc-socket';
import fs from 'fs';
const win = new BrowserWindow();
const socket = new Socket(new Transport(ipcMain, win));
socket.open('main-win');
socket.onEvent('ready', (evt: Event) => {
console.log('Renderer process is ready');
});
// renderer-process.js
import { ipcRenderer } from 'electron';
import { Socket } from 'electron-ipc-socket';
const socket = new Socket(ipcRenderer);
socket.open('main-win');
socket.send('ready');
// main-process.js
import { ipcMain, BrowserWindow } from 'electron';
import { Socket, Transport, Event, InboundRequest } from 'electron-ipc-socket';
import fs from 'fs';
const win = new BrowserWindow();
const socket = new Socket(new Transport(ipcMain, win));
socket.open('main-win');
socket.onRequest('ping', (req: InboundRequest) => {
return 'pong';
});
// renderer-process.js
import { ipcRenderer } from 'electron';
import { Socket } from 'electron-ipc-socket';
const socket = new Socket(ipcRenderer);
socket.open('main-win');
socket
.request('ping')
.then(content => console.log(content))
.catch(err => console.error(err));
// main-process.js
import { ipcMain, BrowserWindow } from 'electron';
import { Socket, Transport, Event, InboundRequest } from 'electron-ipc-socket';
import fs from 'fs';
import util from 'util';
const read = util.promisify(fs.read);
const win = new BrowserWindow();
const socket = new Socket(new Transport(ipcMain, win));
socket.open('main-win');
socket.onRequest('file', async (req: InboundRequest) => {
return read(req.data);
});
// renderer-process.js
import { ipcRenderer } from 'electron';
import { Socket } from 'electron-ipc-socket';
const socket = new Socket(ipcRenderer);
socket.open('main-win');
socket
.request('file', 'package.json')
.then(content => console.log(content))
.catch(err => console.error(err));
FAQs
Response-request abstraction on top of Electron IPC system.
We found that electron-ipc-socket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.