[protobuf] a serialization problem, please help, so confused.

2017-06-08 Thread David Zhao
client excerpt: socket_.async_connect(ip::tcp::endpoint(ip::address::from_string(ip), port), [this](boost::system::error_code ec) { if (!ec) { GOOGLE_PROTOBUF_VERIFY_VERSION; mcmessage::Query query; std::string key; std::string value;

[protobuf] Re: a serialization problem, please help, so confused.

2017-06-08 Thread David Zhao
another example: #include "client.h" #include "proto/uMemcached.pb.h" int main() { //Client client("127.0.0.1", 2); //client.run(); mcmessage::Query query; query.set_type(mcmessage::Query::SET); query.set_key("good"); query.set_value("bad"); std::string str;

Re: [protobuf] Re: a serialization problem, please help, so confused.

2017-06-08 Thread David Zhao
d::string(buf, n) > > On Thu, Jun 8, 2017 at 9:57 AM David Zhao > > wrote: > >> another example: >> #include "client.h" >> #include "proto/uMemcached.pb.h" >> >> int main() { >> >> //Client client("127