
If you send a byte, a byte should arrive. If you send a wchar_t it has a different size on different platforms. If you send a integer it has different endianess (byte order). Maybe this last point is your issue. You have the same problem with file formats. Andrea -----Messaggio originale----- Da: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] Per conto di Ákos Maróy Inviato: venerdì 8 agosto 2008 12.01 A: boost-users@lists.boost.org Oggetto: [Boost-users] cross-platfrom binary serialization? Hi, I'm working on a cross-platform project, where we're serializing data and sending it over TCP, using boost::serialization and boost::asio. As the data is quite big, and is mainly numeric, binary serialization provides a nice advantage over XML-based serialization, both in terms of performance and data size. But, I've found that the serialized data itself is not cross-platform. E.g. if I have a simple app, that sends serialized data via a TCP connection, it works fine as long as both ends of the connection are on the same platform (say both are Linux x86_64, or both are Windows XP). but they don't interact with each other - the data sent by one platform is not accepted 'as is' by the other. I wonder what provisions have to be done to achieve binary serialization that would work in such a context? Akos _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users