()
| 2437 | * ServerInitialization |
| 2438 | */ |
| 2439 | _initMsg() { |
| 2440 | switch (this._rfbInitState) { |
| 2441 | case 'ProtocolVersion': |
| 2442 | return this._negotiateProtocolVersion(); |
| 2443 | |
| 2444 | case 'Security': |
| 2445 | return this._negotiateSecurity(); |
| 2446 | |
| 2447 | case 'Authentication': |
| 2448 | return this._negotiateAuthentication(); |
| 2449 | |
| 2450 | case 'SecurityResult': |
| 2451 | return this._handleSecurityResult(); |
| 2452 | |
| 2453 | case 'SecurityReason': |
| 2454 | return this._handleSecurityReason(); |
| 2455 | |
| 2456 | case 'ClientInitialisation': |
| 2457 | this._sock.sQpush8(this._shared ? 1 : 0); // ClientInitialisation |
| 2458 | this._sock.flush(); |
| 2459 | this._rfbInitState = 'ServerInitialisation'; |
| 2460 | return true; |
| 2461 | |
| 2462 | case 'ServerInitialisation': |
| 2463 | return this._negotiateServerInit(); |
| 2464 | |
| 2465 | default: |
| 2466 | return this._fail("Unknown init state (state: " + |
| 2467 | this._rfbInitState + ")"); |
| 2468 | } |
| 2469 | } |
| 2470 | |
| 2471 | // Resume authentication handshake after it was paused for some |
| 2472 | // reason, e.g. waiting for a password from the user |
no test coverage detected