Attaches the addon to a Peer instance. This method is called when the addon is
added to a peer using peer.attach(addon).
The Peer instance to attach to.
Detaches the addon from a Peer instance. This method is called when the addon is
removed from a peer using peer.detach(addon).
The Peer instance to detach from.
Emits one or more events from the addon.
Event name or list of event names.
Arguments to pass to the event handlers.
Unsubscribes from one or more events emitted by the addon.
Event name or list of event names.
Optionalhandler: (...args: any[]) => voidOptional event handler to remove. If not provided, all handlers for the event(s) will be removed.
Subscribes to one or more events emitted by the addon.
Event name or list of event names.
Event handler.
Subscribes to one or more events emitted by the addon for a single invocation.
Event name or list of event names.
Event handler.
Base class for Peerix addons.
Addons are modular extensions that can be attached to a Peer instance to provide additional functionality or integrate with external services.