OptionalretryInterval: numberOptionalpeerOptionalpeerOptionalremoteReadonlyretryOptionalsocketReadonlyurlStaticprefixedOptionalcontext: anyCalled by the Repo to start the connection process
the peerId of this repo
OptionalpeerMetadata: PeerMetadatahow this adapter should present itself to other peers
Called by the Repo to disconnect from the network
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optionalfn: (Optionalcontext: anyOptionalonce: booleanAdd a listener for a given event.
Optionalcontext: anyAdd a one-time listener for a given event.
Optionalcontext: anyRemove all listeners, or those of the specified event.
Optionalevent: keyof NetworkAdapterEventsRemove the listeners of a given event.
Optionalfn: (Optionalcontext: anyOptionalonce: booleanCalled by the Repo to send a message to a peer
the message to send
Native WebSocket error events are intentionally opaque — on both the browser and Node the error detail is withheld from scripts by design (https://stackoverflow.com/a/31003057/239663) — so we just log and let the retry logic reconnect.