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

Use a Reader/Writer pattern to simplify the network protocols. #762

Open
IntegratedQuantum opened this issue Nov 1, 2024 · 0 comments
Open
Labels
engine refactor shuffle a lot of code around

Comments

@IntegratedQuantum
Copy link
Member

The network Reader/Writer could simplify the protocol code by taking care of ensuring the network byte order, handling the currently explicit pointer incrementing remaining[4..] which is all over the place. And it could also help with #264 by making it easier to handle out of range errors without having to explicitly check them everywhere.

In the future this could allow easily integrating something like varints (ints of variable length).

And as a far-future bonus optimization, we might be able to save an extra copy of the data on receive.

@IntegratedQuantum IntegratedQuantum added engine refactor shuffle a lot of code around labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine refactor shuffle a lot of code around
Projects
None yet
Development

No branches or pull requests

1 participant