thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zd.wbh"<>
Subject 回复: C++ serialization/deserialization examples
Date Fri, 23 Jul 2010 07:13:16 GMT
Raghava, you can use TMemoryBuffer, something like:

 shared_ptr<TMemoryBuffer> strBuffer(new TMemoryBuffer());
 shared_ptr<TBinaryProtocol> binaryProtcol(new TBinaryProtocol(strBuffer));
 strBuffer->resetBuffer((uint8_t*) raw, *lengthPtr);;

serialization is the oppsite, use write method.


发件人: Raghava Mutharaju <>
发送时间: 2010-07-23 15:05
主 题: C++ serialization/deserialization examples

Hello all, 

I am using Thrift to share data between applications written in 2 different 
languages (java & c++). I have used TSerializer and TDeserializer for java 
(Binary Protocol) to serialize a message into a file. I haven't found its 
equivalent classes in C++. Can someone suggest how to serialize/deserialize 
using C++. Some steps or small code snippet would be useful. 

Thank you. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message