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

Make CalculateChecksum accept []byte, not Frame #6

Open
bartekpacia opened this issue Oct 9, 2021 · 2 comments
Open

Make CalculateChecksum accept []byte, not Frame #6

bartekpacia opened this issue Oct 9, 2021 · 2 comments

Comments

@bartekpacia
Copy link
Member

This is just an idea. This might make the API more flexible.

It will be a breaking change, so v2.0.0 will have to be released, but currently not many projects depend on this package, so this is might be a sensible thing to do.

@TK-A369
Copy link
Member

TK-A369 commented Oct 9, 2021

So, you think to calculate checksum only from data, and not from from header, length byte and plus sign? Do I understand it correctly?
If yes, I think it's not good idea, because in this case, when errors occurs while transmitting i.e. header, checksum will not change, and this communication error cannot be detected.

@bartekpacia
Copy link
Member Author

No no, it's purely a syntactical change. It's hard to explain a difference to someone not familiar with Go. We will still be verifying the whole frame:)

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

No branches or pull requests

2 participants