Skip to content
tRPC

Partners

Function: createWSClient()

On this page

createWSClient(opts): WsClient

Defined in: packages/client/src/links/wsLink/createWsClient.ts:12

Opens and manages a WebSocket connection to a tRPC server. Pass it to wsLink.

Parameters

ParameterType
optsWebSocketClientOptions

Returns

WsClient

See

https://trpc.io/docs/client/links/wsLink#wslink--createwsclient-options