Skip to content

fix: handle noncontiguous send buffers#14

Open
PDXKimani wants to merge 1 commit intokvc0:v1from
PDXKimani:fix/noncontiguous-buffers
Open

fix: handle noncontiguous send buffers#14
PDXKimani wants to merge 1 commit intokvc0:v1from
PDXKimani:fix/noncontiguous-buffers

Conversation

@PDXKimani
Copy link
Contributor

@PDXKimani PDXKimani commented Feb 11, 2026

Ran into this when trying to put together a zero-copy encoder for RESP - you really kinda have to use a noncontiguous implementation of Buf for that to work with protosocket.

The issue is that if a buffer was backed by noncontiguous slices, .chunk() will usually only return the first section.

So we'll only partially write that buffer out to the wire before moving onto the next, and then when we come back to do our advance bookkeeping, we get totally off-track.

I'm not really entirely sure this properly handles things either... but it's at least closer for well-behaving implementors of chunks_vectored, I think?

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