I would like to send 1024 bytes of data using Thrift. It must be exactly 1024 bytes because it is a comparative benchmark with other frameworks.
Thrift has two types to represent bytes : 'byte' and 'binary', but I don't know how to use these types. 'binary' type is mapped to std::string which is quite strange (I don't understand why and how to use it). 'byte' type is mapped to a 8 bits integer which seems more logical to me.
To represent 1024 bytes of data, I use : list<byte> byteSequence
with a size of 1024.
But a compile warning advises me to use binary
instead of list<byte>
, but why ? and how ?
I think I will get much better performance with 'binary' because it is strangely slow with a 1024 sequence of bytes.
Thank you.