mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-02 14:32:56 +07:00
Testing server PINGs
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user