-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer-management #26
Comments
(These lines are from the example programs On reflection, this is fine: for (; reader.is_complete(); reader = reader.next_message_reader()) { But maybe this hffix::message_writer new_order(logon.message_end(), buffer + sizeof(buffer)); should be more like: hffix::message_writer new_order = logon.next_message_writer(); Though the current system is a pretty simple API and if we are going to improve it, we want to make sure that the improvements are even simpler.
We cannot, in general, ensure that when a The problem with this whole thing is that is has the effect of hiding the buffer arithmetic instead of making the buffer arithmetic explicit and transparent. If we append messages to the buffer with std::cout.write(buffer, new_order.message_end() - buffer); |
I think the current design is alright. It makes sense for users to explicitly mange the buffer arithmetics, since |
I suspect that |
Split out the buffer-management features of message_reader and message_writer into separate classes?
The issue I guess comes down to
for (; reader.is_complete(); reader = reader.next_message_reader()) {
and
hffix::message_writer new_order(logon.message_end(), buffer + sizeof(buffer));
being kind of weird.
The text was updated successfully, but these errors were encountered: