Send the pubsub pattern subscription notification to the client. */
| 95 | |
| 96 | /* Send the pubsub pattern subscription notification to the client. */ |
| 97 | void 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 |
no test coverage detected