Closed ecorm closed 9 years ago
Open-source code for Base64 conversion is available here. It has a BSD style license and is small enough to be incorporated directly into the CppWAMP source tree. I noticed that it's being used by Cereal.
This is now implemented (release pending). Variant now has a Blob
field in its discriminated union, with Blob
being a wrapper around a std::vector<uint8_t>
. Base64 encoding/decoding for JSON has been written from scratch so that encoded messages can be written directly to TransportBuffer
objects.
The Binary conversion of JSON Strings section of the WAMP spec describes how to encode/decode byte arrays.
For MsgPack, the BIN format should be used.
wamp::Variant
would have be to extended with another bound type to contain byte arrays.std::vector<uint8_t>
seems like a good candidate.