DerockD
tRPC3y ago
14 replies
Derock

Is it possible to only use WebSockets when necessary, otherwise use httpbatch or http?

I have an application, and on certain pages I need live data. Is there a way to only have tRPC open a websocket for subscriptions and then use another link otherwise?

I would like for the solution to disconnect from WS when all subscriptions have been ended, so no dangling WS connections.
Was this page helpful?