• Joel Martin's avatar
    State machine refactoring. · f00b1e37
    Joel Martin authored
    Add new states 'loaded', 'connect' and 'fatal':
    - Loaded state is first page state. Pass WebSockets mode message using
      this state.
    - Connect indicates that the user has issued a "connect" but we
      haven't gotten an WebSockets onopen yet.
    - Fatal is a condition that indicates inability to continue on: right
      now, lack of WebSockets/Flash or non-working canvas.
    
    Move much of the actual state transition code into updateState.
    
    Handle 'password' state better in default_controls.js; instead of
    disconnecting, prompt for password to send.
    
    Add comments to updateState indicating possible states.
    f00b1e37
vnc.js 47 KB