
21 Dec
2009
21 Dec
'09
4:36 p.m.
I'm trying to convert my hand-rolled marshalling code into boost::serialization and boost::ip classes. My code gets handed a SOCKET handle (win XP). I have no control over this, the connection/server/client stuff is handled elsewhere, I just get the SOCKET after everything's already open. How can I create an iostream from that, so I can then use the Archive classes to send and receive objects over the socket? I understand the "harder" stuff (writing the overloads for my classes for input/output to a generic stream). I'm just stuck on finding that construction (or function) that will take an already opened SOCKET handle and wrap an iostream around it. any clues?