How to use the @novnc/novnc/core/websock.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 kvdi / kvdi / ui / app / src / lib / audioManager.js View on Github external
async _connect (retry) {
    this._socket = new Websock()
    this._socket.open(this._addressGetter.audioURL())
    this._socket.binaryType = 'arraybuffer'
    this._socket.on('close', (event) => {
      if (!event.wasClean && (event.code === 1006 && !retry)) {
        this._userStore.dispatch('refreshToken')
          .then(() => {
            this._connect(true)
          })
          .catch((err) => {
            this.emit(Events.error, err)
            throw err
          })
        return
      }
      this.stopRecording()
      if (!event.wasClean || (event.code !== 1000 && event.code !== 1005)) {

@novnc/novnc

An HTML5 VNC client

MPL-2.0
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis