Using duplex stream as transport?
I'm using a framework that gives me a node duplex stream for communication between front and back end. Can I somehow wrap that stream with tRPC?
9 Replies
i don't think any browser supports duplex streams?
It runs inside an electron app
we don't have any link that supports duplex transport except the wsLink that kinda does
what's your usecase?
we might be be open to adding it [if you do all the work, we have no use of it ourselves]
Use case is communication between a worker process and desktop/mobile front ends (https://docs.pears.com/pear-runtime/api#const-pipe-pear.worker.pipe)
I'm not sure if I'm up to the task. That means writing some sort of plugin for trpc?
why do you want the streams to be duplex?
It's not that I want that. That's what the framework gives me
i don't understand the problem, but you can definitely use trpc in electron (just google "trpc electron")
Aight, thanks for your help