Skip to content

@procwire/client

@procwire/client - Child-side API for Procwire IPC.

This package provides the client-side implementation for child processes to communicate with the parent process using Procwire’s binary protocol.

import { Client } from '@procwire/client';
const client = new Client()
.handle('query', async (data, ctx) => {
const results = await search(data);
ctx.respond(results);
})
.handle('insert', async (data, ctx) => {
ctx.ack({ accepted: true });
await processInBackground(data);
})
.event('progress');
await client.start();
// Emit events to parent
client.emitEvent('progress', { percent: 50 });

Renames and re-exports Schema


Renames and re-exports Schema


Re-exports Schema