mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 14:45:38 +02:00
lang/c/msgpack: C++ binding: pack()
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@73 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
try {
|
||||
std::stringstream s;
|
||||
pack(should, s);
|
||||
pack(s, should);
|
||||
std::string str(s.str());
|
||||
object ro = unpack(str.data(), str.size(), m_zone);
|
||||
std::cout << ro << std::endl;
|
||||
@@ -139,7 +139,7 @@ int main(void)
|
||||
// send message
|
||||
{
|
||||
for(unsigned i=0; i < TASK_REPEAT; ++i) {
|
||||
pack(task, stream);
|
||||
pack(stream, task);
|
||||
}
|
||||
std::cout << "send " << stream.str().size() << " bytes" << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user