mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
RESP3: put RESP version in the client structure.
This commit is contained in:
parent
f44e00b691
commit
1ac6926647
@ -107,6 +107,7 @@ client *createClient(int fd) {
|
||||
uint64_t client_id;
|
||||
atomicGetIncr(server.next_client_id,client_id,1);
|
||||
c->id = client_id;
|
||||
c->resp = 2;
|
||||
c->fd = fd;
|
||||
c->name = NULL;
|
||||
c->bufpos = 0;
|
||||
|
@ -712,6 +712,7 @@ typedef struct readyList {
|
||||
typedef struct client {
|
||||
uint64_t id; /* Client incremental unique ID. */
|
||||
int fd; /* Client socket. */
|
||||
int resp; /* RESP protocol version. Can be 2 or 3. */
|
||||
redisDb *db; /* Pointer to currently SELECTed DB. */
|
||||
robj *name; /* As set by CLIENT SETNAME. */
|
||||
sds querybuf; /* Buffer we use to accumulate client queries. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user