README
ws-heartbeats
Ping / pong heartbeats for node ws.
Usage
require('ws-heartbeats')(websocketClient, [Optional] options)
Example
var sendHeartbeats = require('ws-heartbeats');
websocketServer.on('connection', function (websocketClient) {
sendHeartbeats(websocketClient);
});
Options
An optional hash containing a subset of the following:
heartbeatTimeout
- The period in which to deem a client dead in ms.heartbeatInterval
- The time between each ping to a client in ms.
Test
npm test