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])¶
connection<Connection>interfaceName<string>methods<string[]>
proxy.emit(eventName, ...eventArgs)¶
eventName<string>...eventArgs<any>
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.