CLIENT GETNAME
Since 1.1.0Server
Syntax
CLIENT GETNAMEReturns the name the connection was given with CLIENT SETNAME, or nil when it has none. A connection starts without a name, and CLIENT SETNAME "" takes its name away again.
Names make connections easy to find: they show as name= in CLIENT LIST and CLIENT INFO, and many client libraries set one from a setting such as client_name.
Reply
The name, as a bulk string, or nil.
Examples
> CLIENT GETNAME
(nil)
> CLIENT SETNAME worker-1
OK
> CLIENT GETNAME
"worker-1"
> CLIENT SETNAME ""
OK
> CLIENT GETNAME
(nil)