Plain anonymous pipes - which wrapper model are you using? (WinAPI, C ++)

I have two running processes on Windows and each process has a pipe to the other.

I want to serialize a complex class and pass it from one process to another. I already have a serialization routine and I understand that pipes send binary streams. What should I do with sending serialized data? I am using WinAPI and C ++.

Should I develop my own protocol? If so, should it be common or unique for this class? Can I save virtual tables when submitting a serialized class?

Are there any models or design patterns that are commonly used in this case? Some example code would be greatly appreciated. Thank!

+1


source to share


4 answers


Here is a tutorial for boost::serialization

. I could imagine this would be ok to pipe data and deserialize on the other side: http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/tutorial.html



+2


source


You might want to check the protocol protocol .



+2


source


You can use boost :: asio :: windows :: stream_handle to organize iostream like io and do it asynchronously.

+1


source


You don't need to worry about vtables as boost serialize will worry about types. The only thing you need to do is make sure some type is serializable, then you use the EXACT TYPE on the other hand when de-serializing.

+1


source







All Articles