MCPcopy Create free account
hub / github.com/apache/cloudstack / _handleXvpMsg

Method _handleXvpMsg

systemvm/agent/noVNC/core/rfb.js:2695–2716  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 1

_normalMsgMethod · 0.95

Calls 5

_setCapabilityMethod · 0.95
_failMethod · 0.95
rQwaitMethod · 0.80
rQskipBytesMethod · 0.80
rQshift8Method · 0.80

Tested by

no test coverage detected