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

Adding unique protocol id #4

Closed
TimonPost opened this issue Oct 2, 2018 · 4 comments
Closed

Adding unique protocol id #4

TimonPost opened this issue Oct 2, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@TimonPost
Copy link
Owner

Problem

Imagine we have multiple version of this protocol someone is using for the first version and the for the server an old version. This could go wrong since we might have changed the packet content in newer versions.

Solution
We could include some crc32 code in the packet this crc32 code is some encode version of the version number or something like that. The crc32 encoded string will be encoded with the version id / protocol version. This way we can identify if the two packets are from the same server/client version. If the packet is not matching the server version it will be dropped each packet should have some unique protocol id

@LucioFranco
Copy link
Contributor

@TimonPost are you planning on doing this one? If so please assign it to yourself so that someone else doesn't go and do it 😄

@LucioFranco
Copy link
Contributor

LucioFranco commented Oct 7, 2018

also dropping this in here for future reference https://crates.io/crates/crc

@TimonPost
Copy link
Owner Author

eagleness was working on that If I where right.

@TimonPost TimonPost added enhancement New feature or request brain power needed labels Oct 19, 2018
@TimonPost TimonPost self-assigned this Oct 20, 2018
bors bot added a commit that referenced this issue Oct 21, 2018
55: Implemented protocol id for headers. r=fhaynes,LucioFranco a=TimonPost

Implemented protocol id see #4  for more information.

Please during review check these out:
- laminar-0.1.0 
From this value or crc32 will be generated do we agree on this notation for protocol version.
- I use unsafe in on place see /src/protocol_version.rs, I can change this to `lazy_static` but like the current way, it could also be done. What should I do with this? 
- I use CRC32 for encoding of protocol version. Maybe an option to have CRC16? I don't know if there is some major difference between the who other than the size.

O shit. I see that I have to comment some things from `ProtocolVersion` I'll update it later.

Co-authored-by: Timon Post <timonpost@hotmail.nl>
@TimonPost
Copy link
Owner Author

See #55

@TimonPost TimonPost mentioned this issue Oct 22, 2018
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants