Attach 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.
Detach 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.
Emit one or more events from the addon.
Event name or list of event names.
Arguments to pass to the event handlers.
Unsubscribe from one or more events emitted by the addon.
Event name or list of event names.
Optionalhandler: (...args: AddonEvents[K]) => voidOptional event handler to remove. If not provided, all handlers for the event(s) will be removed.
Subscribe to one or more events emitted by the addon.
Event name or list of event names.
Event handler.
Subscribe 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.