()
| 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 |
no test coverage detected