I have a structure in c++ which stores bytes like this:
struct RemoteData
{
/// some other fields here
unsigned char* buf;
int bufLen;
};
And I need to send this data to remote service, written in C++, via thrift. I found three ways how to map this structure to thrift idl:
Using container types like this:
struct RemoteData { 1: list<BYTE> buf, ... }
Using
binary
type:struct RemoteData { 1: binary buf, ... }
Storing data in
string
type:struct RemoteData { 1: string buf, ... }
What is the best way?