Provide a low-level api to write multiple non-contiguous byte-slices into a message #1549
Unanswered
bennetthardwick
asked this question in
General
Replies: 1 comment
|
FG-11794 Provide a low-level api to write multiple non-contiguous byte-slices into a message |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
From the discussion in #1359.
It would be a great to have a way to write the data section of a message without needing to buffer the entire message in memory first.
This would be useful in cases where:
IoSlice,zenoh::Sample)Similar to how writing attachments works - writing messages could be broken up into the following steps:
start_message(message_header): write the len, message header and put the writer into the "writing message" stateput_attachment_bytes(&bytes[..]): write bytes to the messagefinish_message: complete the message, verify the len, etc. is correctThere might be some challenges around writing messages when chunks are or are not enabled, but I imagine there would just be separate entries in the
WriteModeenum.All reactions