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

Function addReplyPubsubPatSubscribed

src/pubsub.cpp:97–105  ·  view source on GitHub ↗

Send the pubsub pattern subscription notification to the client. */

Source from the content-addressed store, hash-verified

95
96/* Send the pubsub pattern subscription notification to the client. */
97void addReplyPubsubPatSubscribed(client *c, robj *pattern) {
98 if (c->resp == 2)
99 addReply(c,shared.mbulkhdr[3]);
100 else
101 addReplyPushLen(c,3);
102 addReply(c,shared.psubscribebulk);
103 addReplyBulk(c,pattern);
104 addReplyLongLong(c,clientSubscriptionsCount(c));
105}
106
107/* Send the pubsub pattern unsubscription notification to the client.
108 * Pattern can be NULL: this is useful when the client sends a mass

Callers 1

pubsubSubscribePatternFunction · 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