-
Notifications
You must be signed in to change notification settings - Fork 0
ECHO
Young Yu edited this page May 26, 2024
·
6 revisions
Sends a value to the server, then the server sends the exact same value back.
echo <value>
-
value
: The value that the server should echo back. Required.
In the example below we simply echo hello world!
.
> echo "hello world!"
hello world!
Assume all values are encoded using the length-prefixed protocol, without spaces in between (the spaces in the TCP format are just for clarification). For example by SET NAME JOE
I mean 3\r\nSET4\r\nNAME3\r\nJOE
where each value is prefixed by it's length followed by the delimiter \r\n
.
ECHO <value>
-
value
: This is a required field specifying the value that the server should echo back.
ECHO hello
would be encoded as:
4\r\nECHO5\r\nhello