summaryrefslogtreecommitdiff
path: root/example/stream.cc
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@vcore.(none)>2009-02-25 18:55:56 +0900
committerfrsyuki <frsyuki@vcore.(none)>2009-02-25 18:55:56 +0900
commita89dfc70b997201cea3587de922924dec2bb28e7 (patch)
tree83b2ef054046f66d457dd350f3a36a4fd03f04e2 /example/stream.cc
parentbdd13859b60d06ec6fabdbaccea81cbee189b8bc (diff)
downloadmsgpack-python-a89dfc70b997201cea3587de922924dec2bb28e7.tar.gz
fix msgpack::unpack_return
Diffstat (limited to 'example/stream.cc')
-rw-r--r--example/stream.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/example/stream.cc b/example/stream.cc
index e57318f..8fd92f9 100644
--- a/example/stream.cc
+++ b/example/stream.cc
@@ -113,6 +113,7 @@ int main(void)
// client thread:
fwriter writer(pair[1]);
+ msgpack::packer<fwriter> pk(writer);
typedef msgpack::type::tuple<std::string, std::string, std::string> put_t;
typedef msgpack::type::tuple<std::string, std::string> get_t;
@@ -120,9 +121,9 @@ int main(void)
put_t req1("put", "apple", "red");
put_t req2("put", "lemon", "yellow");
get_t req3("get", "apple");
- msgpack::pack(writer, req1);
- msgpack::pack(writer, req2);
- msgpack::pack(writer, req3);
+ pk.pack(req1);
+ pk.pack(req2);
+ pk.pack(req3);
writer.flush();
writer.close();