Currently I am facing an issue where i am passing a buffer object over a pipe from x64 arch to x86 arch. The object also contains some pointer values, which is 8 bytes in x64 which the same pointer size on x86 is 4 bytes. Now when i am transmitting the object over pipe then size of it is bit more than what x86 platform was expecting for the same object (because pointer size in here is less). What i could understood from similar post in this forum that i might need to use serialization but i do not know how as i have never used serialization before. Will serialization will solve this problem? I am using C++ with GCC compiler. I want the product would work on all arch (ia64, x64 or x86).
Share
boost serialization is designed specifically to :
By the way, use POD structures, and make sure to have use data types of a specific type. For that use predefined types (for example, take a look here)