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

Add a simple way to version tag payloads #3

Closed
fjtc opened this issue Nov 27, 2022 · 2 comments
Closed

Add a simple way to version tag payloads #3

fjtc opened this issue Nov 27, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@fjtc
Copy link
Contributor

fjtc commented Nov 27, 2022

Add a simple way to version tag payloads. The current suggestion is to format the payload with a version prefix and a way to put the actual payload after that.

@fjtc fjtc added this to the v0.1.1 milestone Nov 27, 2022
@fjtc
Copy link
Contributor Author

fjtc commented Nov 27, 2022

This implementation will use generics as a way to simplify its usage.

@fjtc fjtc closed this as completed Nov 27, 2022
@fjtc fjtc added the enhancement New feature or request label Nov 27, 2022
@monoman
Copy link
Contributor

monoman commented Nov 29, 2022

In C#, most payloads derive from VersionedPayload, which assumes the first field (Version) is an unsigned short int (16 bits) tag (id 5), with the version number. And this value is used to direct the serialization/deserialization of the remaining fields.
Different from your implementation Version is a tag itself and occupies 3 bytes. This was done to be more compatible in parsing alongside previously unversioned payloads.

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