mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-30 12:50:58 +00:00
mg_add_uri_handler -> mg_set_request_handler()
This commit is contained in:
1 parent
a6cfbd2536
commit
14526a2109
12 files changed
+116
-120
No files matched your search
@@ -24,10 +24,13 @@
|
||||
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 > 100) {
|
||||
if (!ev.data) {
|
||||
out('<span style="color: blue;">PING... </span>');
|
||||
} else {
|
||||
out('<span style="color: blue;">RESPONSE: ' + ev.data + ' </span>');
|
||||
num_messages++;
|
||||
}
|
||||
if (num_messages > 15) {
|
||||
websocket.send('exit');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user