diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/message.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/message.cpp b/common/message.cpp index 1429736..5c5ab50 100644 --- a/common/message.cpp +++ b/common/message.cpp @@ -3,8 +3,8 @@ #include <boost/serialization/vector.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/shared_ptr.hpp> -#include <boost/archive/text_oarchive.hpp> -#include <boost/archive/text_iarchive.hpp> +#include <boost/archive/binary_oarchive.hpp> +#include <boost/archive/binary_iarchive.hpp> #include <cstring> #include <sstream> @@ -33,7 +33,7 @@ Message::BoostBase<Sub>::BoostBase(Type t) : Base(t) { template<class Sub> std::pair<uint8_t*, std::size_t> Message::BoostBase<Sub>::serialize() { std::ostringstream os; - boost::archive::text_oarchive oa(os); + boost::archive::binary_oarchive oa(os); oa & *this; @@ -48,7 +48,7 @@ std::pair<uint8_t*, std::size_t> Message::BoostBase<Sub>::serialize() { template<class Sub> void Message::BoostBase<Sub>::deserialize(uint8_t* data, std::size_t bytes) { std::istringstream is(std::string((char*)data, bytes)); - boost::archive::text_iarchive ia(is); + boost::archive::binary_iarchive ia(is); ia & *this; } |