Skip to content

transport: wire real stream Reset / CancelRead / CancelWrite (finish #40) - #78

Merged
ch4r10t33r merged 1 commit into
mainfrom
feat/stream-reset-40
Jul 5, 2026
Merged

transport: wire real stream Reset / CancelRead / CancelWrite (finish #40)#78
ch4r10t33r merged 1 commit into
mainfrom
feat/stream-reset-40

Conversation

@ch4r10t33r

Copy link
Copy Markdown
Collaborator

Part of #40. Connects the shim's previously no-op stream-cancel stubs to zquic's new raw-app reset API (ch4r10t33r/zquic#240, v1.7.68), mirroring the Go transport Reset / CancelRead / CancelWrite.

Changes

  • Bump zquic v1.7.67 → v1.7.68.
  • zquic_quic_shim.streamCancelWriteRESET_STREAM (Go Reset/CancelWrite).
  • zquic_quic_shim.streamCancelReadSTOP_SENDING (Go CancelRead) — asks the peer to stop sending, releasing our receive obligation / flow-control credit; the peer replies with RESET_STREAM.
  • zquic_quic_shim.streamResetReceived(st) ?u64 → the peer's application error code if it reset the stream (read side of Go StreamResetError{Code}).
  • Both cancel paths are role-aware (client vs server) and now consume the formerly-dead Stream.reset_how as the app error code.

Coverage

  • The QUIC handshake tests already drive streamCancelWrite via PeerConn.close (now a real RESET_STREAM) — zig build test-quic green.
  • The RESET_STREAM round-trip (send → peer observes the code) is covered by the negative-controlled loopback test in zquic#240; the zig-ethp2p side is a thin, role-aware passthrough.

zig build test + zig build test-quic pass on stock 0.16.0. README updated. With the earlier ConnectionStats PR (#77), this lands the concrete transport-control items from the Go reference; datagrams ("not supported yet" upstream too) and stream deadlines (deliberate poll-driven divergence) remain out of scope.

)

Bumps zquic to v1.7.68 and connects the shim's previously no-op stream
cancel stubs to zquic's new raw-app reset API:

  - `streamCancelWrite` → RESET_STREAM (Go transport `Reset`/`CancelWrite`)
  - `streamCancelRead`  → STOP_SENDING (Go `CancelRead`), releasing our
    receive obligation / flow-control credit — the peer replies RESET_STREAM
  - `streamResetReceived` → the peer's application error code if it reset the
    stream (read side of Go `StreamResetError{Code}`)

Both are role-aware (client vs server) and now consume the formerly-dead
`Stream.reset_how` as the application error code. The QUIC handshake tests
already drive `streamCancelWrite` via `PeerConn.close`; the RESET_STREAM
round-trip itself is covered by the zquic loopback test in
zigstack/zquic#240.

Together with the earlier `ConnectionStats` change, this lands the concrete
transport-control features from the Go reference. Refs #40.
@ch4r10t33r
ch4r10t33r merged commit 40df1a3 into main Jul 5, 2026
7 checks passed
@ch4r10t33r
ch4r10t33r deleted the feat/stream-reset-40 branch July 5, 2026 19:52
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