DanKnox/websocket-rails — pull request #102 by fuelxc (2013-06-25 20:42:17+00:00)
Title: Added method to check if the connection is stale

This is based off the server sending a ping every 10s. We default to 2 pings (+1s)

I added this because I needed to check for a stale connection before ajax requests that could send a WS event from the server. It is nice to know if the connection is stale to either reconnect or display a message to the user notifying them that the connection to the server may have been severed.