Good suggestions.
The lib was originally made as intrinsic thing so it has artefacts.
XML implementation is the history artefact, the reason was that boost didn't have satisfied xml processing support at the time the xml messaging was implemented.
In next revision I'm going to consider those lacks.
Yes, the boost iostreams is really cool, I thought about this.
But I think that the syntax sugar provided by the chevron (>>,<<) operations is not really significant.
Anyway the "chevron" interface can be implemented as a wrapper. Also the asynchronous nature of i/o operations
complicates the implementation and the usage. E.g. in case of synchronous streams the operations are trivial and on the other hand async streams introduce extra complexity to the interface and implementation.
It's really wanted to know when the async operation completed. So it's needed to bind completion handlers on each operation as option.
What would be a way of implementing those? The write is almost clear, but what with the read. Whether to tell that we want exact message to be read or it doesn't matter? There are plenty of thoughts here. I'm going to have them in future if I have time. There are should be many hours of thinking to achieve the rational(e) design.
And the last reason of the current design is that I didn't have enough experience when the design was made.
1 2 3 4
|
async_tcp_message_stream message_ios;
// or it would be a just byte stream and the interpretation should be performed on other level.
message_ios << foo_message(&handler) << bar_message(&handler) >> foo_message(&handler) >> any_message(&handler);
|
Unfortunately, the company the lib was made in context of is dead, so nobody wants help me. Now I involved into another project development and can't attend too much time to this one.
Regards,
Dmitry.