Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1ac69266
Commit
1ac69266
authored
Nov 21, 2018
by
antirez
Browse files
RESP3: put RESP version in the client structure.
parent
f44e00b6
Changes
2
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
1ac69266
...
...
@@ -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;
...
...
src/server.h
View file @
1ac69266
...
...
@@ -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. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment