-2

I have a std::multimap variable containing key-value data, and want to transfer it to a remote server over socket.

I known, in Java, we can serialize the object as byte stream and transfer it. However, can I do the same thing in C++? If not, how can I transfer std::multimap data over socket in C++?

Meanwhile, are there some other methods to transfer std::multimap data over socket without serialization, or using 3rd library?

Thanks in advance!

2
  • Possible duplicate of Serialization of STL Class
    – user1593881
    Feb 12, 2017 at 20:07
  • @RawN, I was also wondering whether there is some other ways to transfer a STL container without using a 3rd party library.
    – ignorer
    Feb 12, 2017 at 21:01

1 Answer 1

1

It can be done through boost::serialization, STL collection of it can be found here

2
  • I was also wondering whether there is some other ways to transfer a STL container without using a 3rd party library.
    – ignorer
    Feb 12, 2017 at 21:02
  • @ignorer : I am not aware of it.
    – Shravan40
    Feb 12, 2017 at 21:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.