mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-05 21:18:32 +08:00
Testing server PINGs
This commit is contained in:
parent
1a17165227
commit
04b9ccca22
@ -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');
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user