on(event: "open" | "close", listener: function): this
on(event: "error", listener: function): this
on(event: "event", listener: function): this
on(event: "event <name>", listener: function): this
Emitted when the connection closes/opens.
Parameters
event: "open" | "close"
listener: function
(): void
Returns void
Returns this
Emitted on error, throws if there is no listener.
Parameters
event: "error"
listener: function
(error: Error): void
Parameters
error: Error
Returns void
Returns this
RPC event sent by the server. If the event name is given a type
constructor in IClientOptions.eventTypes the data will
be decoded before the event is emitted.
RPC Client events