vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Class RedisSubscriberImpl

class RedisSubscriberImpl ;

Constructors

NameDescription
this (client)

Properties

NameTypeDescription
isListening[get] bool
subscriptions[get] string[]Get a list of channels with active subscriptions

Methods

NameDescription
blisten (onMessage, timeout)
bstop () Stop listening and yield until the operation is complete.
hasSubscription (channel)
listen (callback, 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 (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 (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 () Stop listening asynchroneously
subscribe (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 (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.
Authors

Jan Krüger, Sönke Ludwig, Michael Eisendle, Etienne Cimon

Copyright

© 2012-2016 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.