@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.
Example
Section titled “Example”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 parentclient.emitEvent('progress', { percent: 50 });Classes
Section titled “Classes”References
Section titled “References”ClientErrors
Section titled “ClientErrors”Renames and re-exports SpawnError
ClientOptions
Section titled “ClientOptions”Renames and re-exports SpawnError
EmptySchema
Section titled “EmptySchema”Renames and re-exports SpawnError
EventDefinition
Section titled “EventDefinition”Renames and re-exports SpawnError
ExtractSchema
Section titled “ExtractSchema”Renames and re-exports SpawnError
MethodDefinition
Section titled “MethodDefinition”Renames and re-exports SpawnError
MethodHandler
Section titled “MethodHandler”Renames and re-exports SpawnError
ProcwireClientError
Section titled “ProcwireClientError”Renames and re-exports SpawnError
RequestContext
Section titled “RequestContext”Renames and re-exports SpawnError
RequestContextImpl
Section titled “RequestContextImpl”Renames and re-exports SpawnError
ResponseType
Section titled “ResponseType”Renames and re-exports SpawnError
Schema
Section titled “Schema”Renames and re-exports SpawnError
TypedRequestContext
Section titled “TypedRequestContext”Renames and re-exports SpawnError