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

Function addReplyPubsubSubscribed

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

Send the pubsub subscription notification to the client. */

Source from the content-addressed store, hash-verified

66
67/* Send the pubsub subscription notification to the client. */
68void addReplyPubsubSubscribed(client *c, robj *channel) {
69 if (c->resp == 2)
70 addReply(c,shared.mbulkhdr[3]);
71 else
72 addReplyPushLen(c,3);
73 addReply(c,shared.subscribebulk);
74 addReplyBulk(c,channel);
75 addReplyLongLong(c,clientSubscriptionsCount(c));
76}
77
78/* Send the pubsub unsubscription notification to the client.
79 * Channel can be NULL: this is useful when the client sends a mass

Callers 1

pubsubSubscribeChannelFunction · 0.85

Calls 5

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

Tested by

no test coverage detected