MCPcopy Create free account
hub / github.com/F-Stack/f-stack / addReplyPubsubUnsubscribed

Function addReplyPubsubUnsubscribed

app/redis-6.2.6/src/pubsub.c:82–93  ·  view source on GitHub ↗

Send the pubsub unsubscription notification to the client. * Channel can be NULL: this is useful when the client sends a mass * unsubscribe command but there are no channels to unsubscribe from: we * still send a notification. */

Source from the content-addressed store, hash-verified

80 * unsubscribe command but there are no channels to unsubscribe from: we
81 * still send a notification. */
82void addReplyPubsubUnsubscribed(client *c, robj *channel) {
83 if (c->resp == 2)
84 addReply(c,shared.mbulkhdr[3]);
85 else
86 addReplyPushLen(c,3);
87 addReply(c,shared.unsubscribebulk);
88 if (channel)
89 addReplyBulk(c,channel);
90 else
91 addReplyNull(c);
92 addReplyLongLong(c,clientSubscriptionsCount(c));
93}
94
95/* Send the pubsub pattern subscription notification to the client. */
96void addReplyPubsubPatSubscribed(client *c, robj *pattern) {

Callers 2

pubsubUnsubscribeChannelFunction · 0.85

Calls 6

addReplyFunction · 0.85
addReplyPushLenFunction · 0.85
addReplyBulkFunction · 0.85
addReplyNullFunction · 0.85
addReplyLongLongFunction · 0.85
clientSubscriptionsCountFunction · 0.85

Tested by

no test coverage detected