Commit 04b9ccca authored by Sergey Lyubka's avatar Sergey Lyubka

Testing server PINGs

parent 1a171652
......@@ -24,9 +24,10 @@
out('DISCONNECTED');
};
websocket.onmessage = function(ev) {
if (!ev.data) return; // No data, this is a PING message, ignore it
out('<span style="color: blue;">RESPONSE: ' + ev.data + ' </span>');
num_messages++;
if (num_messages > 3) {
if (num_messages > 100) {
websocket.send('exit');
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment