EventSourcePublisher class

An EventSource publisher. It can manage different channels of events. This class forms the backbone of an EventSource server. To actually serve a web server, use this together with shelf_eventsource or another server implementation.

Constructors

EventSourcePublisher({int cacheCapacity = 0, bool comparableIds = false, bool enableLogging = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
logger ↔ Logger?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Event event, {Iterable<String> channels = const [""]}) → void
Add a publication to the specified channels.
channel(String channel) Sink<Event>
Creates a Sink for the specified channel.
close({Iterable<String> channels = const [""]}) → void
Close the specified channels.
closeAllChannels() → void
Close all the open channels.
newSubscription({required void onEvent(Event), required void onClose(), required String channel, String? lastEventId}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited