I have a data structure that looks like this:
typedef struct { unsigned short m_short1; unsigned short m_short2; unsigned char m_character; } MyDataType; >
The boost serialization archives can be constructed with any stream. Thus any oarchive can use any ostream, and any iarchive can use any istream. Thus you can archive to an ostringstream, transmit the string with asio, and reconstruct the data from that.
See the reference of binary_oarchive here, for example.