This question in SO (http://stackoverflow.com/questions/37687605/rx-net-message-parser) asks a very valid question of how do I parse some stream of bytes into messages based on a set of rules. The rules however require knowledge of where you are in parsing logic
are you in the header, the body or in between messages?
was the previous byte and escape/control character?
if you are in the body, was the previous byte that is a control character itself escaped?
Thus basic Rx operators are not enough. You can get so far with Buffer(2,1) but it fails in some edge cases.
It would be good to really clean up the example into a recipe. Perhaps using Stateless as the state machine?
This question in SO (http://stackoverflow.com/questions/37687605/rx-net-message-parser) asks a very valid question of how do I parse some stream of bytes into messages based on a set of rules. The rules however require knowledge of where you are in parsing logic
Thus basic Rx operators are not enough. You can get so far with Buffer(2,1) but it fails in some edge cases.
It would be good to really clean up the example into a recipe. Perhaps using Stateless as the state machine?