websocat icon indicating copy to clipboard operation
websocat copied to clipboard

Websocket Connection dies

Open andreasm123 opened this issue 4 years ago • 1 comments

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?

andreasm123 avatar Apr 15 '21 19:04 andreasm123

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

vi avatar Apr 15 '21 19:04 vi