Skip to content

RpcClient

Defined in: src/client/connect.ts:30

A connected RPC client, returned by httpConnect, pipeConnect, and subprocessConnect.

call(method, params?): Promise<Record<string, any> | null>;

Defined in: src/client/connect.ts:32

Invoke a unary method. Returns the single result row, or null for void methods. Parameter defaults from __describe__ are applied automatically.

ParameterType
methodstring
params?Record<string, any>

Promise<Record<string, any> | null>


close(): void;

Defined in: src/client/connect.ts:38

Release transport resources; for subprocess clients this also terminates the child process.

void


describe(): Promise<ServiceDescription>;

Defined in: src/client/connect.ts:36

Fetch the server’s method/protocol description (cached after the first call).

Promise<ServiceDescription>


stream(method, params?): Promise<StreamSession>;

Defined in: src/client/connect.ts:34

Open a streaming method, returning a StreamSession for exchange or producer iteration.

ParameterType
methodstring
params?Record<string, any>

Promise<StreamSession>