sevenS
tRPC2y ago
11 replies
seven

client server counication with webSockets

Hi, I would like to be able to send data via ws api from my frontend. Still, I don't seem to be able to send any data from the frontend to the trpc backend, I tried to do it in a way that I make mutation and I open ws connection in this procedure. Still, it reconnects me on every request and I need this connection to stay open and just send the data, is there a way to send data from trpc client - frontend to the subscription precedure?
On the client, apart from onData there are only onComplete, onError, onSarted, and onStopped.
ws API offers ws.send() and it seems that I can only receive data from the server, is trpc client lacking this functionality or am i missing something?

Many Thanks
Was this page helpful?