Skip to content

Add structure-free read_multiple_bytes_packed #378

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BartWeyder
Copy link

Motivation: A server sends data packages that consist of multiple serialized capnproto messages of different structures. Every message is guaranteed the same first field, which works as a message header containing information about the message structure type. The scheme comprises the UnknownMessage structure that allows parsing the header only.

Solution: Provide a public interface that iterates the buffer with AnyPointer readers, allowing casting a message to UnknownMessage first and then to a specific structure type.

Yevhenii Kizim added 2 commits March 25, 2025 15:42
Motivation: A server sends data packages that consist of multiple
serialized capnproto messages of different structures. Every message is
guaranteed to have the same first field, which works as a message header
containing information about the message structure type.
The scheme comprises the `UnknownMessage` structure that allows parsing
the header only.

Solution: provide a public interface that iterates buffer with
AnyPointer readers to cast a message to `UnknownMessage` first and then
to a specific structure type.
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

Successfully merging this pull request may close these issues.

1 participant