Skip to content
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

DmpCallbacks and DmpConnection are becoming too tightly coupled. #12

Open
Roflincopter opened this issue Feb 12, 2014 · 0 comments
Open

Comments

@Roflincopter
Copy link
Owner

Today I ran into a bug that was indeterministically crashing my client. with a boost serialization exception "invalid signature". This most of time indicates some sort of corruption of the boost::asio::tcp::socket, first and foremost a "double" call to async_receive. But this time it happened because the DmpCallbacks was not past as a reference.

The connection should not have these weird limitations but I cannot think of a better way to do this. The DmpCallbacks class in conjunction with MessageSwitch has saved me considerable dev time because they force you to implement a lot of necessary boilerplate. Without these the program would crash or become quiescent.

So on the one hand I want to keep it just they way it is, but on the other hand, it introduces a hidden requirement on the Connection class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant