This commit is contained in:
JackDoan
2026-05-07 13:18:41 -05:00
parent 01b31360df
commit 400cbc26a1
9 changed files with 145 additions and 281 deletions

View File

@@ -7,9 +7,9 @@ type RxBatcher interface {
Reserve(sz int) []byte
// Commit borrows pkt. The caller must keep pkt valid until the next Flush.
// Walks IP+L4 headers itself; prefer CommitInbound when the caller already
// has an RxParsed in hand from ParseInbound.
// has an RxParsed in hand from ParsePacket.
Commit(pkt []byte) error
// CommitInbound is Commit with a hint produced by ParseInbound, so the
// CommitInbound is Commit with a hint produced by ParsePacket, so the
// batcher can skip the IP+L4 re-parse. Borrowed slice contract is the
// same as Commit. Implementations that don't coalesce may delegate to
// Commit.