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

Function addReplyPubsubPatMessage

src/pubsub.cpp:57–66  ·  view source on GitHub ↗

Send a pubsub message of type "pmessage" to the client. The difference * with the "message" type delivered by addReplyPubsubMessage() is that * this message format also includes the pattern that matched the message. */

Source from the content-addressed store, hash-verified

55 * with the "message" type delivered by addReplyPubsubMessage() is that
56 * this message format also includes the pattern that matched the message. */
57void addReplyPubsubPatMessage(client *c, robj *pat, robj *channel, robj *msg) {
58 if (c->resp == 2)
59 addReply(c,shared.mbulkhdr[4]);
60 else
61 addReplyPushLen(c,4);
62 addReply(c,shared.pmessagebulk);
63 addReplyBulk(c,pat);
64 addReplyBulk(c,channel);
65 addReplyBulk(c,msg);
66}
67
68/* Send the pubsub subscription notification to the client. */
69void addReplyPubsubSubscribed(client *c, robj *channel) {

Callers 1

pubsubPublishMessageFunction · 0.85

Calls 3

addReplyFunction · 0.85
addReplyPushLenFunction · 0.85
addReplyBulkFunction · 0.85

Tested by

no test coverage detected