mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
RESP3: addReplyBool() implemented.
This commit is contained in:
parent
4f0860cbfd
commit
809e3a44a7
@ -611,6 +611,14 @@ void addReplyNull(client *c) {
|
||||
}
|
||||
}
|
||||
|
||||
void addReplyBool(client *c, int b) {
|
||||
if (c->resp == 3) {
|
||||
addReply(c, b ? shared.cone : shared.czero);
|
||||
} else {
|
||||
addReplyString(c, b ? "#t\r\n" : "#f\r\n",4);
|
||||
}
|
||||
}
|
||||
|
||||
/* A null array is a concept that no longer exists in RESP3. However
|
||||
* RESP2 had it, so API-wise we have this call, that will emit the correct
|
||||
* RESP2 protocol, however for RESP3 the reply will always be just the
|
||||
|
@ -1439,6 +1439,7 @@ void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask);
|
||||
void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask);
|
||||
void addReplyNull(client *c);
|
||||
void addReplyNullArray(client *c);
|
||||
void addReplyBool(client *c, int b);
|
||||
void addReplyString(client *c, const char *s, size_t len);
|
||||
void addReplyBulk(client *c, robj *obj);
|
||||
void addReplyBulkCString(client *c, const char *s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user