Merge 3e6325d843 into 342d408d64
This commit is contained in:
commit
4cd9ded8d6
|
|
@ -146,6 +146,7 @@ var RFB;
|
|||
'onFBResize': function () { }, // onFBResize(rfb, width, height): frame buffer resized
|
||||
'onDesktopName': function () { }, // onDesktopName(rfb, name): desktop name received
|
||||
'onXvpInit': function () { }, // onXvpInit(version): XVP extensions active for this connection
|
||||
'onWsConnEvent': function () { }, // onWsConnEvent(eventType, event): a WebSocket connection event occurred
|
||||
});
|
||||
|
||||
// main setup
|
||||
|
|
@ -188,6 +189,8 @@ var RFB;
|
|||
} else {
|
||||
this._fail("Got unexpected WebSocket connection");
|
||||
}
|
||||
|
||||
this._onWsConnEvent('open');
|
||||
}.bind(this));
|
||||
this._sock.on('close', function (e) {
|
||||
Util.Warn("WebSocket on-close event");
|
||||
|
|
@ -209,9 +212,12 @@ var RFB;
|
|||
this._fail("Server disconnected" + msg);
|
||||
}
|
||||
this._sock.off('close');
|
||||
|
||||
this._onWsConnEvent('close', e);
|
||||
}.bind(this));
|
||||
this._sock.on('error', function (e) {
|
||||
Util.Warn("WebSocket on-error event");
|
||||
this.onWsConnEvent('error', e);
|
||||
});
|
||||
|
||||
this._init_vars();
|
||||
|
|
@ -1238,6 +1244,7 @@ var RFB;
|
|||
['onFBResize', 'rw', 'func'], // onFBResize(rfb, width, height): frame buffer resized
|
||||
['onDesktopName', 'rw', 'func'], // onDesktopName(rfb, name): desktop name received
|
||||
['onXvpInit', 'rw', 'func'], // onXvpInit(version): XVP extensions active for this connection
|
||||
['onWsConnEvent', 'rw', 'func'], // onWsConnEvent(eventType, event): A WebSocket connection event occurred
|
||||
]);
|
||||
|
||||
RFB.prototype.set_local_cursor = function (cursor) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue