Skip to content

@persistent-ai/fireflow-executor / client / createTRPCClientWithHandle

Function: createTRPCClientWithHandle() ​

createTRPCClientWithHandle(opts?): TRPCClientHandle

Defined in: packages/fireflow-executor/client/trpc.ts:159

Create a tRPC client with an explicit close handle for the underlying WebSocket.

Unlike createTRPCClient, this returns { client, close } so consumers can properly shut down the WebSocket connection when they're done (e.g., on component unmount or store cleanup). This prevents WebSocket connection leaks.

Parameters ​

opts? ​

auth? ​

AuthOptions

superjsonCustom? ​

typeof default

url ​

string

wsClientCallbacks? ​

{ onClose?: (cause?) => void; onError?: (err?) => void; onOpen?: () => void; }

wsClientCallbacks.onClose? ​

(cause?) => void

wsClientCallbacks.onError? ​

(err?) => void

wsClientCallbacks.onOpen? ​

() => void

Returns ​

TRPCClientHandle

Licensed under BUSL-1.1