Does some basic checks about the web socket state and starts
the actual heartbeat monitoring.
Returns void
Private handleHeartbeat
handleHeartbeat(): void
Implements the business logic required for the heartbeat detection to work.
If the heartbeat stops respecting the previously-set timeout, the client/server
connection is considered dead and the eventually passed in callback is called.
The web socket is also closed with code 1008 (policy violation) and message
"Heartbeat stopped".
Actively handles the heartbeat ping/pong mechanism respecting the specified parameters.