()
| 2693 | } |
| 2694 | |
| 2695 | _handleXvpMsg() { |
| 2696 | if (this._sock.rQwait("XVP version and message", 3, 1)) { return false; } |
| 2697 | this._sock.rQskipBytes(1); // Padding |
| 2698 | const xvpVer = this._sock.rQshift8(); |
| 2699 | const xvpMsg = this._sock.rQshift8(); |
| 2700 | |
| 2701 | switch (xvpMsg) { |
| 2702 | case 0: // XVP_FAIL |
| 2703 | Log.Error("XVP operation failed"); |
| 2704 | break; |
| 2705 | case 1: // XVP_INIT |
| 2706 | this._rfbXvpVer = xvpVer; |
| 2707 | Log.Info("XVP extensions enabled (version " + this._rfbXvpVer + ")"); |
| 2708 | this._setCapability("power", true); |
| 2709 | break; |
| 2710 | default: |
| 2711 | this._fail("Illegal server XVP message (msg: " + xvpMsg + ")"); |
| 2712 | break; |
| 2713 | } |
| 2714 | |
| 2715 | return true; |
| 2716 | } |
| 2717 | |
| 2718 | _normalMsg() { |
| 2719 | let msgType; |
no test coverage detected