Skip to content

Use zero-copy Bytes in packet module - #182

Merged
boivie merged 1 commit into
mainfrom
feature-bytes-5
Nov 13, 2026
Merged

boivie merged 1 commit into
mainfrom
feature-bytes-5

Conversation

@boivie

@boivie boivie commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

In this commit, incoming packets are passed as zero-copy Bytes, with the goal to avoid copying incoming DATA fragment payloads into the chunk representations.

SctpPacket::from_bytes now takes a Bytes, and RawChunk's value is a Bytes slice of the incoming packet. DATA and I-DATA chunks sub-slice it to get their payloads without copying.

@boivie
boivie added this pull request to stack #179 November 12, 2026 09:37
Base automatically changed from feature-bytes-4 to main November 12, 2026 12:25
In this commit, incoming packets are passed as zero-copy Bytes, with
the goal to avoid copying incoming DATA fragment payloads into the chunk
representations.

SctpPacket::from_bytes now takes a Bytes, and RawChunk's value is a
Bytes slice of the incoming packet. DATA and I-DATA chunks sub-slice
it to get their payloads without copying.
@boivie
boivie merged commit 1e3f3db into main Nov 13, 2026
16 checks passed
@boivie
boivie deleted the feature-bytes-5 branch November 13, 2026 12:31
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.

2 participants