Skip to content
tRPC

Partners

Function: createWSClient()

On this page

createWSClient(opts): WsClient

Defined in: packages/client/dist/wsLink-Cjetil1Z.d.mts:282

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