|
Phants Client for Redis™*
|


Public Member Functions | |
| delegate void | SubscribedHandler (SubscriptionClient client, string channelName, long numSubscriptions) |
| delegate void | UnsubscribedHandler (SubscriptionClient client, string channelName, long numSubscriptions) |
| delegate void | PsubscribedHandler (SubscriptionClient client, string channelPattern, long numSubscriptions) |
| delegate void | PunsubscribedHandler (SubscriptionClient client, string channelPattern, long numSubscriptions) |
| delegate void | MessageHandler (SubscriptionClient client, string channelName, string messageContents) |
| delegate void | PmessageHandler (SubscriptionClient client, string channelPattern, string channelName, string messageContents) |
| SubscriptionClient (string hostname, int port, int recvBufferLen) | |
| void | Subscribe (params string[] channels) |
| void | Unsubscribe (params string[] channels) |
| void | Psubscribe (params string[] patterns) |
| void | Punsubscribe (params string[] patterns) |
| void | OnSubscribed (MessageParser parser, string channelName, long numSubscriptions) |
| void | OnUnsubscribed (MessageParser parser, string channelName, long numSubscriptions) |
| void | OnPsubscribed (MessageParser parser, string channelPattern, long numSubscriptions) |
| void | OnPunsubscribed (MessageParser parser, string channelPattern, long numSubscriptions) |
| void | OnMessage (MessageParser parser, string channelName, string messageContents) |
| void | OnPmessage (MessageParser parser, string channelPattern, string channelName, string messageContents) |
Public Member Functions inherited from RedisClientBase | |
| delegate void | ConnectionCallback (RedisClientBase client, string error) |
| delegate void | ConnectedEventHandler (RedisClientBase client) |
| delegate void | DisconnectedEventHandler (RedisClientBase client) |
| RedisClientBase (string hostname, int port) | |
| void | Connect (ConnectionCallback connectCallback=null) |
| void | Disconnect (ConnectionCallback disconnectCallback=null) |
| bool | Connected () |
Protected Member Functions | |
| override void | OnConnect (IAsyncResult connectResult) |
Protected Member Functions inherited from RedisClientBase | |
| virtual void | OnDisconnect (IAsyncResult disconnectResult) |
Additional Inherited Members | |
Protected Attributes inherited from RedisClientBase | |
| string | hostname |
| int | port |
| Socket | socket |
Redis has two modes of operation: a "command" mode, and a "pub/sub" mode. SubscriptionClient implements the latter, meaning users subscribe to channels and wait to receive messages. See pubsub for more information about the Redis publisher/subscriber model.
|
inline |
SubscriptionClient constructor.
| hostname | The hostname or IP to connect to. |
| port | The port to connect to. Redis servers listen on 6379 by default. |
| recvBufferLen | SubscriptionClient allocates a receive buffer internally; this parameter allows users to tailor the buffer size to fit their needs. |
| delegate void MessageHandler | ( | SubscriptionClient | client, |
| string | channelName, | ||
| string | messageContents | ||
| ) |
Delegate type for the messaged event.
|
inlineprotectedvirtual |
Callback used in calls to Socket.BeginConnect().
Reimplemented from RedisClientBase.
|
inline |
Called when a message of type "message" is received.
| parser | The MessageParser that parsed this message. |
| channelName | The name of the originating channel. |
| messageContents | The message payload. |
Implements ResponseProcessor.
|
inline |
Called when a message of type "pmessage" is received.
| parser | The MessageParser that parsed this message. |
| channelPattern | The channel pattern that was matched. |
| channelName | The name of the originating channel. |
| messageContents | The message payload. |
Implements ResponseProcessor.
|
inline |
Called when a message of type "psubscribed" is received.
| parser | The MessageParser that parsed this message. |
| channelPattern | The channel pattern that was matched. |
| numSubscriptions | The number of channels this client is currently subscribed to. |
Implements ResponseProcessor.
|
inline |
Called when a message of type "punsubscribed" is received.
| parser | The MessageParser that parsed this message. |
| channelPattern | The channel pattern that was matched. |
| numSubscriptions | The number of channels this client is currently subscribed to. |
Implements ResponseProcessor.
|
inline |
Called when a message of type "subscribed" is received.
| parser | The MessageParser that parsed this message. |
| channelName | The name of the originating channel. |
| numSubscriptions | The number of channels this client is currently subscribed to. |
Implements ResponseProcessor.
|
inline |
Called when a message of type "unsubscribed" is received.
| parser | The MessageParser that parsed this message. |
| channelName | The name of the originating channel. |
| numSubscriptions | The number of channels this client is currently subscribed to. |
Implements ResponseProcessor.
| delegate void PmessageHandler | ( | SubscriptionClient | client, |
| string | channelPattern, | ||
| string | channelName, | ||
| string | messageContents | ||
| ) |
Delegate type for the pmessaged event.
|
inline |
Subscribe to all Redis channels with names matching the given regular expression.
| patterns | Regular expression pattern(s) used to match channel names. Multiple patterns may be provided. |
Example:
| delegate void PsubscribedHandler | ( | SubscriptionClient | client, |
| string | channelPattern, | ||
| long | numSubscriptions | ||
| ) |
Delegate type for the psubscribed event.
|
inline |
Unsubscribe from all Redis channels with names matching the given regular expression. If the patterns parameter is ommitted, the client will unsubscribe from all channels.
| patterns | Regular expression pattern(s) used to match channel names. Zero or more patterns may be provided. |
Example:
| delegate void PunsubscribedHandler | ( | SubscriptionClient | client, |
| string | channelPattern, | ||
| long | numSubscriptions | ||
| ) |
Delegate type for the punsubscribed event.
|
inline |
Subscribe to one or more Redis channels.
| channels | Channel name(s) being subscribed to. |
Example:
| delegate void SubscribedHandler | ( | SubscriptionClient | client, |
| string | channelName, | ||
| long | numSubscriptions | ||
| ) |
Delegate type for the subscribed event.
|
inline |
Unsubscribe from one or more Redis channels. If the channels parameter is ommitted, the client will unsubscribe from all channels.
| channels | Channel name(s) being unsubscribed from. Zero or more channel names may be provided. |
Example:
| delegate void UnsubscribedHandler | ( | SubscriptionClient | client, |
| string | channelName, | ||
| long | numSubscriptions | ||
| ) |
Delegate type for the unsubscribed event.
| MessageHandler messaged |
Event fired whenever the user receives a message on a Subscribe()d channel.
| PmessageHandler pmessaged |
Event fired whenever the user receives a message on a Psubscribe()d channel.
| PsubscribedHandler psubscribed |
Event fired whenever the user Psubscribe()s (pattern subscribes) to a channel.
| PunsubscribedHandler punsubscribed |
Event fired whenever the user Punsubscribe()s (pattern unsubscribes) from a channel.
| SubscribedHandler subscribed |
Event fired whenever the user Subscribe()s to a channel.
| UnsubscribedHandler unsubscribed |
Event fired whenever the user Unsubscribe()s from a channel.