WeePub v0.1.0 WeePub.Broadcaster View Source
A GenServer
that manages distribution of messages to interested clients
Link to this section Summary
Link to this section Functions
Publish a message
message
The message to be sent to subscribers if theirfilter:
matches
Options
topic:
A narrow cast topic atom. The message will only be evaluated for subscribers registered with a matching topic registration. Note:WeePub.Subscriber
does not currently support generating clients with narrow cast topics.
Registers the caller process as a subscriber to broadcasts.
Options
filter:
A function that accepts a single parameter and returns a boolean. Defaults to all messagestopic:
A narrow cast topic atom. The subscriber’s filter will only be evaluated if the topic matches the topic registered with. Note:WeePub.Subscriber
does not currently support generating clients with narrow cast topics.