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

Method _handleMessage

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

Source from the content-addressed store, hash-verified

1140 }
1141
1142 _handleMessage() {
1143 if (this._sock.rQwait("message", 1)) {
1144 Log.Warn("handleMessage called on an empty receive queue");
1145 return;
1146 }
1147
1148 switch (this._rfbConnectionState) {
1149 case 'disconnected':
1150 Log.Error("Got data while disconnected");
1151 break;
1152 case 'connected':
1153 while (true) {
1154 if (this._flushing) {
1155 break;
1156 }
1157 if (!this._normalMsg()) {
1158 break;
1159 }
1160 if (this._sock.rQwait("message", 1)) {
1161 break;
1162 }
1163 }
1164 break;
1165 case 'connecting':
1166 while (this._rfbConnectionState === 'connecting') {
1167 if (!this._initMsg()) {
1168 break;
1169 }
1170 }
1171 break;
1172 default:
1173 Log.Error("Got data while in an invalid state");
1174 break;
1175 }
1176 }
1177
1178 _handleKeyEvent(keysym, code, down, numlock, capslock) {
1179 // If remote state of capslock is known, and it doesn't match the local led state of

Callers 1

_framebufferUpdateMethod · 0.95

Calls 3

_normalMsgMethod · 0.95
_initMsgMethod · 0.95
rQwaitMethod · 0.80

Tested by

no test coverage detected