luca3m / redis3m

A C++ Redis client
Apache License 2.0
189 stars 78 forks source link

binary safe string in redis3m #3

Closed bxshi closed 10 years ago

bxshi commented 10 years ago

Hi, thanks for your contribution first! It is really an awesome and straight forward wrapper. I did not find the way to send binary safe string in your code, is this not implemented yet or I just missing something?

Thanks for your help!

luca3m commented 10 years ago

Hi,

Thanks for trying redis3m! :)

C++ strings (std::string) are binary safe, so you can use them:

std::string bar(mybuf, bufsize);
conn->run(command("SET") << "foo" << bar);