|
|
|
@@ -101,11 +101,14 @@ document.onreadystatechange = function () { |
|
|
|
var data =JSON.parse(e.data) |
|
|
|
var html = ""; |
|
|
|
if (data != null){ |
|
|
|
console.log("data= " + e.data); |
|
|
|
console.log("msg length= " + messageQueue.length); |
|
|
|
if(messageQueue.length > maxSize){ |
|
|
|
delete messageQueue[0]; |
|
|
|
}else{ |
|
|
|
messageQueue.push(data); |
|
|
|
console.log("msg length= " + messageQueue.length); |
|
|
|
} |
|
|
|
messageQueue.push(data); |
|
|
|
console.log("msg length= " + messageQueue.length); |
|
|
|
var currentTime = new Date().getTime(); |
|
|
|
for(var i = 0; i < messageQueue.length; i++){ |
|
|
|
var record = messageQueue[i]; |
|
|
|
|