How to use the @novnc/novnc/core/rfb.js function in @novnc/novnc

To help you get started, we’ve selected a few @novnc/novnc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openbmc / phosphor-webui / app / server-control / directives / kvm-console.js View on Github external
return false;
              };

              function connected(e) {
                $log.debug('RFB Connected');
              }

              function disconnected(e) {
                $log.debug('RFB disconnected');
              }

              var host = $location.host();
              var port = $location.port();
              var target = element[0].firstElementChild;
              try {
                rfb = new RFB(
                    target, 'wss://' + host + ':' + port + '/kvm/0', {});

                rfb.addEventListener('connect', connected);
                rfb.addEventListener('disconnect', disconnected);
              } catch (exc) {
                $log.error(exc);
                updateState(
                    null, 'fatal', null,
                    'Unable to create RFB client -- ' + exc);
                return;  // don't continue trying to connect
              };

              scope.openWindow = function() {
                window.open(
                    '#/server-control/kvm-window', 'Kvm Window',
                    'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1125,height=900');

@novnc/novnc

An HTML5 VNC client

MPL-2.0
Latest version published 27 days ago

Package Health Score

84 / 100
Full package analysis