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

Function addReplyPubsubPatMessage

app/redis-6.2.6/src/pubsub.c:56–65  ·  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

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