RedisSubscriberImpl

Undocumented in source.

Constructors

this
this(RedisClient client)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

blisten
void blisten(void delegate(string, string) @(safe) onMessage, Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
bstop
void bstop()

Stop listening and yield until the operation is complete.

hasSubscription
bool hasSubscription(string channel)
Undocumented in source. Be warned that the author may not have intended to support it.
listen
Task listen(void delegate(string, string) @(safe) nothrow callback, Duration timeout)

Waits for messages and calls the callback with the channel and the message as arguments. The timeout is passed over to the listener, which closes after the period of inactivity. Use 0.seconds timeout to specify a very long time (365 days) Errors will be sent to Callback Delegate on channel "Error".

psubscribe
void psubscribe(string[] args)

Same as subscribe, but uses glob patterns, and does not return instantly if the subscriptions are already registered. throws Exception if the pattern does not yield a new subscription.

punsubscribe
void punsubscribe(string[] args)

Same as unsubscribe, but uses glob patterns, and does not return instantly if the subscriptions are not registered. throws Exception if the pattern does not yield a new unsubscription.

stop
void stop()

Stop listening asynchroneously

subscribe
void subscribe(string[] args)

Completes the subscription for a listener to start receiving pubsub messages on the corresponding channel(s). Returns instantly if already subscribed. If a connection error is thrown here, it stops the listener.

unsubscribe
void unsubscribe(string[] args)

Unsubscribes from the channel(s) specified, returns immediately if none is currently being listened. If a connection error is thrown here, it stops the listener.

Properties

isListening
bool isListening [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
subscriptions
string[] subscriptions [@property getter]

Get a list of channels with active subscriptions

Meta