square/SocketRocket — pull request #59 by justinrosenthal (2012-11-04 19:01:51+00:00)
Title: Add support for interfacing with Ping/Pong outside of SRWebSocket

This patch adds an interface to explicitly send a ping control frame (with optional data). Additionally, it adds an optional delegate method that gets invoked when a pong is received.

These small changes make it easier to implement something like a watchdog state machine that ensures the connection is always healthy by periodically sending pings.