in reply to pack() and non-64bit systems

To make your program really portable and platform independent, there is no way you should send out c structure directly.

Not only 32-bit, 64-bit, 128-bit is a problem, there are many other problems, for example, little endian, big endian etc.

You have to define your own encoding schema, and encode (on sending side) and decode (on receiving side) by yourself. There is no easy way to gain full portability.

A better way is to use SOAP, so you can focus on your data, and let SOAP take care of the rest for you.