dumbpipe
dumbpipe copied to clipboard
Add broadcast mode
...so that a node can accept any number of connections, and will pipe STDIN live to all incoming connections.
Maybe this mode would not support receiving data on the node started with dumbpipe listen because this would need business logic on what to do with the incoming data.
So e.g. ffmpeg ... | dumbpipe broadcast --> print ticket
And then any number of nodes can connect and view/listen to the live broadcast.
Not quite sure how this would work. So you want to listen from stdin from the moment of connection (currently it will buffer from the start), and also mix all the stuff that is sent to you to stdout?
why not just take in the output of dumbpipe connect and pipe it into a binary that does broadcasting?
e.g.
# sender
ffmpeg ... | dumbpipe listen | wl-copy
# receiver
export nodeId=$(wl-paste)
dumbpipe connect $nodeId | nc -u -b 255.255.255.255 12101