Closed brendon closed 4 years ago
Looking closer, I don't think action_cable
provides any transparency into the overall connection, only to individual subscription connections. A bit of a shame, but nevermind.
I suppose one could use a kind of dummy global subscription and use the callbacks in that.
Yes. It's why I went with Node.js & socket.io for a Websocket implementation where I needed to be aware of client or server disconnection.
Is your feature request related to a problem? Please describe. I'd like to indicate to the user when the WebSocket connection goes down (and also prevent some actions).
Describe the solution you'd like I'd imagine being able to specify the callbacks (connect and disconnect) in the configuration object?
Describe alternatives you've considered There doesn't seem to be any other way to detect the initial connection that I can see :)