I was going to send the structure from client to server using boost :: asio :: async_write_some , in this case boost :: serialization comes to the rescue:
//boost::serialization struct blank { int m_id; std::string m_message; template<typename archive> void serialize(archive& ar, const short version) { ar & m_id; ar & m_message; } }; blank info; info.m_id = 1; info.m_name = "Rasul"; std::stringstream ss; boost::archive::binary_oarchive out_archive(ss); out_archive << info; How can I send / receive out_archive using boost :: asio asynchronously? If you have any other ideas?