feat(neshub): iroh 1.3, and send each frame as one datagram batch

send_many_datagrams queues a frame's fragments under one lock hold and
one driver wake instead of one per fragment. It also rejects the whole
frame on TooLarge, so a path that shrinks mid-frame no longer leaves half
a frame on the wire for the client to time out. Eviction behaviour is
unchanged. A refused PyroWave frame now keeps its sequence number, since
nothing went out under it. pyro_bench mirrors both ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DatCaptainHorse
2026-10-05 15:57:53 +03:00
co-authored by Claude Opus 5.5
parent 030dcc5a8c
commit 10fdeddc70
6 changed files with 79 additions and 43 deletions
+8
View File
@@ -90,6 +90,14 @@ or a connection that is already gone, never for one the path could not carry.
prioritising old frames over current ones, which for live media is the wrong
trade.)
The hub sends each frame with `send_many_datagrams` (iroh 1.3), which is the
same call over a batch: `send_many(datagrams, true)`, evicting exactly as
above and returning the full count. What it adds is that the batch is queued
under one lock hold, and a `TooLarge` on any fragment rejects the whole batch,
so a frame goes out whole or not at all. noq-proto's `send_many` with
`drop: false` would queue until full and return a partial count — a real
backpressure signal — but iroh does not expose that mode.
A sender overrunning the path is therefore told nothing at all. Any counter
fed by that return value cannot be non-zero however badly things are going,
which is exactly how a field report came to contain "encoder perfectly healthy,