Add ws heartbeat to keep connection alive through firewall

This commit is contained in:
Nick O'Leary
2014-04-24 23:42:44 +01:00
parent b5a8a7288b
commit 13deef189d
2 changed files with 25 additions and 1 deletions

View File

@@ -134,6 +134,9 @@
}
ws.onmessage = function(event) {
var o = JSON.parse(event.data);
if (o.heartbeat) {
return;
}
//console.log(msg);
var msg = document.createElement("div");
msg.onmouseover = function() {