You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
Am writing a C -application which used to write data to redis.So basically the command is hmset input_list:0 msg "mess
agetest 1"
So the way am approaching is
sprintf(msg,"test message from redis 1"
sprintf(cmd,"hmset input_list:0 msg %s",msg);
Batch_write(batch, cmd, strlen(cmd), 1);
Here the error comes as wrong number of argumnets in hmset and as I check it through monitor the error is due to the fact that the command is fired to redis as "hmset input_list:0 test message from redis i.e after space it takes it as parameter not as single string.
Can u please help me in this.
The text was updated successfully, but these errors were encountered:
Redis support both unified request protocol and "inline command" protocol.
The unified request protocol, much like http, prepends a length line before every data line.
hmset input_list:0 msg some text
should be translated as:
*4\r\n$5\r\nhmset\r\n$12\r\ninput_list:0\r\n$3\r\nmsg\r\n$9\r\nsome text\r\n
The "inline command", however, does not contain length lines, thus is unable to carry any space in strings, and should be only used when having nothing but telnet at hand.
Hi ,
Am writing a C -application which used to write data to redis.So basically the command is hmset input_list:0 msg "mess
agetest 1"
So the way am approaching is
sprintf(msg,"test message from redis 1"
sprintf(cmd,"hmset input_list:0 msg %s",msg);
Batch_write(batch, cmd, strlen(cmd), 1);
Here the error comes as wrong number of argumnets in hmset and as I check it through monitor the error is due to the fact that the command is fired to redis as "hmset input_list:0 test message from redis i.e after space it takes it as parameter not as single string.
Can u please help me in this.
The text was updated successfully, but these errors were encountered: