perf(net): own one pooled async receive
Replace timeout-polled in-world UDP receives with one cancellable caller-buffered socket operation. Transfer only right-sized pooled datagrams through the FIFO, return every ownership edge deterministically, and send caller spans without a transport copy while preserving handshake pacing and ACK order.
This commit is contained in:
parent
a2a1e5916d
commit
7211bb1bf7
10 changed files with 547 additions and 87 deletions
|
|
@ -135,6 +135,19 @@ behavior is outside this performance-only unit.
|
|||
|
||||
## 4. H-c — ordered, allocation-conscious network I/O
|
||||
|
||||
H-c is executed as three independently reversible units:
|
||||
|
||||
1. **H-c1 — pooled receive owner — COMPLETE.** One cancellable async socket
|
||||
receive, a retained full-size edge buffer, right-sized pooled FIFO
|
||||
datagrams, unchanged blocking handshake cadence, and direct span sends.
|
||||
Evidence:
|
||||
[`../research/2026-07-25-slice-h-c1-pooled-receive-owner.md`](../research/2026-07-25-slice-h-c1-pooled-receive-owner.md).
|
||||
2. **H-c2 — borrowed decode — ACTIVE.** Parse and verify headers, optional
|
||||
fields, and fragments as borrowed views. Copy only multi-fragment state
|
||||
that must survive the current datagram.
|
||||
3. **H-c3 — direct outbound framing — PENDING.** Write packet and fragment
|
||||
framing into caller storage and remove intermediate payload arrays.
|
||||
|
||||
Retail/transport invariants:
|
||||
|
||||
- one outstanding receive;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue