mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-07 21:04:37 +00:00
Add getters/setter to websock
This commit is contained in:
12
core/rfb.js
12
core/rfb.js
@@ -681,7 +681,7 @@ export default class RFB extends EventTargetMixin {
|
||||
}
|
||||
|
||||
_handle_message() {
|
||||
if (this._sock.rQlen() === 0) {
|
||||
if (this._sock.rQlen === 0) {
|
||||
Log.Warn("handle_message called on an empty receive queue");
|
||||
return;
|
||||
}
|
||||
@@ -698,7 +698,7 @@ export default class RFB extends EventTargetMixin {
|
||||
if (!this._normal_msg()) {
|
||||
break;
|
||||
}
|
||||
if (this._sock.rQlen() === 0) {
|
||||
if (this._sock.rQlen === 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -779,7 +779,7 @@ export default class RFB extends EventTargetMixin {
|
||||
// Message Handlers
|
||||
|
||||
_negotiate_protocol_version() {
|
||||
if (this._sock.rQlen() < 12) {
|
||||
if (this._sock.rQlen < 12) {
|
||||
return this._fail("Received incomplete protocol version.");
|
||||
}
|
||||
|
||||
@@ -1360,7 +1360,7 @@ export default class RFB extends EventTargetMixin {
|
||||
|
||||
_handle_xvp_msg() {
|
||||
if (this._sock.rQwait("XVP version and message", 3, 1)) { return false; }
|
||||
this._sock.rQskip8(); // Padding
|
||||
this._sock.rQskipBytes(1); // Padding
|
||||
const xvp_ver = this._sock.rQshift8();
|
||||
const xvp_msg = this._sock.rQshift8();
|
||||
|
||||
@@ -1442,7 +1442,7 @@ export default class RFB extends EventTargetMixin {
|
||||
_onFlush() {
|
||||
this._flushing = false;
|
||||
// Resume processing
|
||||
if (this._sock.rQlen() > 0) {
|
||||
if (this._sock.rQlen > 0) {
|
||||
this._handle_message();
|
||||
}
|
||||
}
|
||||
@@ -1450,7 +1450,7 @@ export default class RFB extends EventTargetMixin {
|
||||
_framebufferUpdate() {
|
||||
if (this._FBU.rects === 0) {
|
||||
if (this._sock.rQwait("FBU header", 3, 1)) { return false; }
|
||||
this._sock.rQskip8(); // Padding
|
||||
this._sock.rQskipBytes(1); // Padding
|
||||
this._FBU.rects = this._sock.rQshift16();
|
||||
|
||||
// Make sure the previous frame is fully rendered first
|
||||
|
||||
Reference in New Issue
Block a user