Testing server PINGs

This commit is contained in:
Sergey Lyubka 2013-12-18 09:35:19 +00:00
parent 1a17165227
commit 04b9ccca22

View File

@ -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');
}
};