peers/peerjs — pull request #233 by RangerMauve (2014-08-09 16:27:00+00:00)
Title: Added heartbeat to keep the socket open

When the Peer object is initialized, it'll optionally listen to the `open` and `disconnected` events in order to send a message of type `HEARTBEAT` to the server while the connection is open. It automatically stops sending messages when on disconnect.

This adds a new heartbeat option which can be used to either set the heartbeat interval or disable the heartbeat with a falsy value.