Function: createWSClient()
createWSClient(
opts
):object
Parameters
Parameter | Type |
---|---|
opts | WebSocketClientOptions |
Returns
object
close()
close: () =>
void
Returns
void
connectionState
connectionState:
BehaviorSubject
<TRPCConnectionState
<TRPCClientError
<AnyRouter
>>>
reconnect()
reconnect: (
cause
) =>void
Reconnect to the WebSocket server
Parameters
Parameter | Type |
---|---|
cause | null | Error |
Returns
void
request()
request: (
opts
) =>UnsubscribeFn
Parameters
Parameter | Type |
---|---|
opts | object |
opts.callbacks | WSCallbackObserver <AnyRouter , unknown > |
opts.lastEventId | undefined | string |
opts.op | Operation |
Returns
UnsubscribeFn
connection
Get Signature
get connection():
null
|Connection
Returns
null
| Connection
See
https://trpc.io/docs/v11/client/links/wsLink
Deprecated
🙋♂️ Contributors needed to continue supporting WebSockets! See https://github.com/trpc/trpc/issues/6109