mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
CLIENT ID implemented.
This commit is contained in:
parent
345b4809f4
commit
ed65d734e7
@ -1553,6 +1553,7 @@ void clientCommand(client *c) {
|
|||||||
|
|
||||||
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
|
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
|
||||||
const char *help[] = {
|
const char *help[] = {
|
||||||
|
"id -- Return the ID of the current connection.",
|
||||||
"getname -- Return the name of the current connection.",
|
"getname -- Return the name of the current connection.",
|
||||||
"kill <ip:port> -- Kill connection made from <ip:port>.",
|
"kill <ip:port> -- Kill connection made from <ip:port>.",
|
||||||
"kill <option> <value> [option value ...] -- Kill connections. Options are:",
|
"kill <option> <value> [option value ...] -- Kill connections. Options are:",
|
||||||
@ -1566,6 +1567,9 @@ void clientCommand(client *c) {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
addReplyHelp(c, help);
|
addReplyHelp(c, help);
|
||||||
|
} else if (!strcasecmp(c->argv[1]->ptr,"id") && c->argc == 2) {
|
||||||
|
/* CLIENT ID */
|
||||||
|
addReplyLongLong(c,c->id);
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"list") && c->argc == 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"list") && c->argc == 2) {
|
||||||
/* CLIENT LIST */
|
/* CLIENT LIST */
|
||||||
sds o = getAllClientsInfoString();
|
sds o = getAllClientsInfoString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user