Creates a NetworkEventEmitter
Callback that accepts the event and emits it to other processes
Callback that unlinks this emitter from the network
Disposes of this event, preparing it to release from memory
Runs the subscriptions for the event
ExperimentalemitSends the event to the other processes and runs this process's subscriptions for it, keeping each of those subscribers' failures to itself. See PlatformEventEmitter.emitIsolated.
Event data to provide to subscribed callbacks
Run with the error a subscriber threw and that subscriber's position in the subscription order. Must not throw. Only local subscribers are reported here; a failure to reach the network is reported where the network callback was supplied.
Subscribes a function to run when this event is emitted.
Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.
Use like const unsubscriber = event(callback)
Unsubscriber function to run to stop calling the passed-in function when the event is emitted
ProtectedassertCheck to make sure this emitter is not disposed. Throw if it is
ProtecteddisposeDisposes of this event, preparing it to release from memory. Added here so children can override emit and still call the base functionality.
ProtectedemitFunction that runs the subscriptions for the event. Added here so children can override emit and still call the base functionality. See NetworkEventEmitter.emit for example
ProtectedemitExperimentalFunction that runs the subscriptions for the event in isolation from each other. Added here so children can override emitIsolated and still call the base functionality.
Runs only the subscriptions for the event that are on this process. Does not send over network
Event data to provide to subscribed callbacks
ExperimentalRuns only the subscriptions for the event that are on this process, keeping each subscriber's failure to itself. Does not send over network. See PlatformEventEmitter.emitIsolated.
Event data to provide to subscribed callbacks
Run with the error a subscriber threw and that subscriber's position in the subscription order. Must not throw.
Networked version of EventEmitter - accepts subscriptions to an event and runs the subscription callbacks when the event is emitted. Events on NetworkEventEmitters can be emitted across processes. They are coordinated between processes by their type. Use eventEmitter.event(callback) to subscribe to the event. Use eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be private, and its event should be public. That way, the emitter is not publicized, but anyone can subscribe to the event.
WARNING: Do not use this class directly outside of NetworkService, or it will not do what you expect. Use NetworkService.createNetworkEventEmitter.
WARNING: You cannot emit events with complex types on the network.