vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
7.18k stars 278 forks source link

Is there a way to keep websocat receiving content from named pipe? #179

Closed mbekkomo closed 1 year ago

mbekkomo commented 1 year ago

Is there a way to keep websocat receiving content from named pipe?

For example, I have a FIFO named myfifo in /tmp (/tmp/myfifo). I want it to always receiving content from pipe without reconnecting it.

while true; do
  websocat - wss://ws.ifelse.io --text < /tmp/myfifo
  # Don't disconnect after receiving content from pipe
done
vi commented 1 year ago

Maybe you want something like this:

websocat --text autoreconnect:open-async:/tmp/myfifo - | websocat - wss://ws.ifelse.io --text
mbekkomo commented 1 year ago

Okay, I will try it

mbekkomo commented 1 year ago

websocat hangs after receiving second message from pipe

mbekkomo commented 1 year ago

Nevermind, I'll use the method from issue #68. Anyway thanks for the help.