Skip to content

RemoteProxy

Class: jstp.RemoteProxy

Remote API proxy object class that extends EventEmitter. It wraps remote methods so that they look like regular local methods and acts like a remote event emitter.

Using proxy.on() you can subscribe to both local and remote events.

Constructor: new RemoteProxy(connection, interfaceName[, methods])

proxy.emit(eventName, ...eventArgs)

Emits event over the connection.

It also emits the event on the proxy instance.

proxy[methodName](...args, callback[, resend])

  • methodName <string>
  • ...args <any>
  • callback <Function>
  • resend <boolean> If set to true, call message will be resent if it is not possible to get a callback.