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. */
| 54 | * with the "message" type delivered by addReplyPubsubMessage() is that |
| 55 | * this message format also includes the pattern that matched the message. */ |
| 56 | void 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. */ |
| 68 | void addReplyPubsubSubscribed(client *c, robj *channel) { |
no test coverage detected