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

Function addReplyPubsubSubscribed

src/pubsub.cpp:69–77  ·  view source on GitHub ↗

Send the pubsub subscription notification to the client. */

Source from the content-addressed store, hash-verified

67
68/* Send the pubsub subscription notification to the client. */
69void addReplyPubsubSubscribed(client *c, robj *channel) {
70 if (c->resp == 2)
71 addReply(c,shared.mbulkhdr[3]);
72 else
73 addReplyPushLen(c,3);
74 addReply(c,shared.subscribebulk);
75 addReplyBulk(c,channel);
76 addReplyLongLong(c,clientSubscriptionsCount(c));
77}
78
79/* Send the pubsub unsubscription notification to the client.
80 * 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