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

Websocket Connection dies #116

Open andreasm123 opened 3 years ago

andreasm123 commented 3 years ago

I'm currently using websocat with the following command to establish a websocket connection to an Internet Server:

websocat -t -u tcp-l:127.0.0.1:1234 reuse-raw:- | websocat -t - "$url" --ping-interval 60 > websocat.out &

So far everything works fine. However sporadically the websocket connection dies (due to my bad Internet connection) and it seems websocat somehow does not recognize this (the processes are still running fine). Once that happens i need to restablish the connection from scratch as communication is token based. Is there a way (commandline switch?) to identify dead/broken connections which terminates the websocat processes?

vi commented 3 years ago

Maybe you want --ping-timeout in addition to --ping-interval (and -E option for it to be effective)?