I am facing some issues with my inter-process communication using protobuf. Protobuf allows a set of serialization formats:
SerializeToArray(void * data, int size) : bool
SerializeToCodedStream(google::protobuf::io::CodeOutputStream * output) : bool
SerializeToFileDescriptor(int file_descriptor) : bool
SerializeToOstream(ostream * output)
My problem is, I have no clue how to use it with the boost asio sockets I am using, as I implemented them to send strings:
boost::asio::write(socket, boost::asio::buffer(message),
boost::asio::transfer_all(), ignored_error);
But I would like to send the ostream.