UNPKG

@jsonjoy.com/reactive-rpc

Version:

Reactive-RPC is a library for building reactive APIs over WebSocket, HTTP, and other RPCs.

18 lines (17 loc) 752 B
import { Writer } from '@jsonjoy.com/util/lib/buffers/Writer'; import { type TypedRpcClient } from '../rpc'; import type { RpcCaller } from '../rpc/caller/RpcCaller'; import type { CallerToMethods } from '../types'; export interface BuildE2eClientOptions { writer?: Writer; writerDefaultBufferKb?: [min: number, max: number]; serverBufferSize?: [min: number, max: number]; serverBufferTime?: [min: number, max: number]; clientBufferSize?: [min: number, max: number]; clientBufferTime?: [min: number, max: number]; ip?: string; token?: string; } export declare const buildE2eClient: <Caller extends RpcCaller<any>>(caller: Caller, opt?: BuildE2eClientOptions) => { client: TypedRpcClient<CallerToMethods<Caller>>; };