Opera fixes and big Opera performance boost.

Add message/state pollling in web-socket-js. Since Opera tends to drop
message events, we can dramatically increase performance by polling
every now for message event data.

Also, add more direct calls to update readyState so that it's not
missed when Opera drops events.
This commit is contained in:
Joel Martin
2010-07-01 11:54:44 -05:00
parent 4a96178307
commit bc8e3d4db7
3 changed files with 51 additions and 29 deletions

View File

@@ -194,9 +194,9 @@ connect: function (host, port, password, encrypt, true_color) {
disconnect: function () {
//console.log(">> disconnect");
if ((RFB.ws) && (RFB.ws.readyState === WebSocket.OPEN)) {
RFB.ws.close();
RFB.updateState('closed');
RFB.ws.onmessage = function (e) { return; };
RFB.ws.close();
}
if (Canvas.ctx) {
Canvas.stop();