New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rbbn/distant-electron-vdi

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbbn/distant-electron-vdi

High level management of VDI capabilities. These include: - Creating Distant Controllers - Managing Virtual Channels - Creating Distant Sessions - Sending messages to a Distant Session

  • 1.1.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Distant Electron VDI

High level management of VDI capabilities. These include:

  • Creating Distant Controllers
  • Managing Virtual Channels
  • Creating Distant Sessions
  • Sending messages to a Distant Session

Usage

const { VDI } = require('distant-electron-vdi')

const moduleName = 'vdiModule'
const url = 'https://example/my/remote/application'
const id = 123

function handleVDIMessage(type, data) {
  ...
}

async function setup() {
  // Create instance
  const vdi = vdi = new VDI(url, moduleName, handleVDIMessage)

  // Create channel handle and Distant Controller
  await this.vdi.init()

  // Create session with automatic event handling
  // `handleVDIMessage()` will receive messages of type `sessionInfo`, `sdkMessage` and `logMessage`
  await vdi.createSessionWithEventHandling(id)

  // Send a message to the remote application
  vdi.sendSessionMessage(id, 'sdkMessage', { data: 'hello' })

  // Create another session with a different remote application URL and specific timeout value
  const differentID = 456
  const differentURL = 'https://different/url/for/remote/application'
  const timeout = 3000

  await vdi.createSessionWithEventHandling(differentID, differentURL, timeout)

  // Close session by ID
  vdi.closeSession(id)

  // Shut down: close all sessions, destroy channel handle and destroy Distant Controller
  await vdi.close()
}

FAQs

Package last updated on 18 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc