mirror of
https://github.com/fluencelabs/redis
synced 2025-06-16 18:51:20 +00:00
RESP3: addReply*Len() support for RESP2 backward comp.
This commit is contained in:
@ -562,23 +562,23 @@ void addReplyArrayLen(client *c, long length) {
|
||||
}
|
||||
|
||||
void addReplyMapLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'%');
|
||||
int prefix = c->resp == 2 ? '*' : '%';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplySetLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'~');
|
||||
int prefix = c->resp == 2 ? '*' : '~';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplyAttributeLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'|');
|
||||
int prefix = c->resp == 2 ? '*' : '|';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplyPushLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'>');
|
||||
}
|
||||
|
||||
void addReplyHelloLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'@');
|
||||
int prefix = c->resp == 2 ? '*' : '>';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
/* Create the length prefix of a bulk reply, example: $2234 */
|
||||
|
Reference in New Issue
Block a user