Skip to main content

API reference

Every public class of vrpc-js, generated from its JSDoc. For what the classes are for and how they work together, start with How VRPC works.

ClassUse it to
VrpcClientcall agents: create and delete instances, call functions, subscribe to events
VrpcAgentoffer the classes of a program to clients over a broker
VrpcAdapterregister classes and instances, and listen to what happens to them
VrpcPersistorkeep an agent's shared instances across restarts
VrpcNativecall C++ code compiled into a Node.js addon
const { VrpcClient, VrpcAgent, VrpcAdapter, VrpcPersistor, VrpcNative } = require('vrpc')

In the browser​

The browser build of vrpc exports VrpcClient, and a VrpcAgent and VrpcAdapter for agents in a page (see VRPC in the browser). VrpcClient is the same class. The browser VrpcAgent takes the same options, but has no create() and no fromCommandline(); the browser VrpcAdapter registers classes with registerClass(Klass, options) and plain functions with registerFunction(fn, name), and publishes no JSDoc meta data. VrpcPersistor and VrpcNative are Node.js only.