MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / clientSubscriptionsCount

Function clientSubscriptionsCount

src/pubsub.cpp:129–132  ·  view source on GitHub ↗

Return the number of channels + patterns a client is subscribed to. */

Source from the content-addressed store, hash-verified

127
128/* Return the number of channels + patterns a client is subscribed to. */
129int clientSubscriptionsCount(client *c) {
130 return dictSize(c->pubsub_channels)+
131 listLength(c->pubsub_patterns);
132}
133
134/* Subscribe a client to a channel. Returns 1 if the operation succeeded, or
135 * 0 if the client was already subscribed to that channel. */

Callers 6

addReplyPubsubSubscribedFunction · 0.85
unsubscribeCommandFunction · 0.85
punsubscribeCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected