vi / websocat

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

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

Closed cattokomo closed 1 year ago

cattokomo 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
cattokomo commented 1 year ago

Okay, I will try it

cattokomo commented 1 year ago

websocat hangs after receiving second message from pipe

cattokomo commented 1 year ago

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