Boost logo

Boost Users :

From: Andrea Denzler (andrea_at_[hidden])
Date: 2008-08-08 06:08:57


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_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] Per conto di Ákos Maróy
Inviato: venerdì 8 agosto 2008 12.01
A: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net