robn/pusher-perl — pull request #4 by jhgorse (2014-04-02 03:49:19+00:00)
Title: WebSocket keep alives and error handling

Added on_wtimeout ping (at least twice per 120 second interval) and keepalive to keep the connection from dropping.
Added JSON decode error checking.
Added on_error callback to give us feedback if the connection drops that's not EOF.

N.B. I was looking at WebSocket::Frame and it appears that pings are just opcode 9 with empty buffer and pongs are any buffer with opcode 10, even if the buffer has data we care about. When watching a live log of ping/pong events, there is some odd delay which seems excessive. With the longer wtimeout times it seems to be less of an issue.