Skip to content

Allow stream reuse - #13

Open
plotnick wants to merge 3 commits into
mainfrom
stream-reuse
Open

Allow stream reuse#13
plotnick wants to merge 3 commits into
mainfrom
stream-reuse

Conversation

@plotnick

Copy link
Copy Markdown

sush will use qorb pools of sprockets connections in order to amortize the cost of RoT signatures (most of a second).

Also includes the trivial Endpoint::local_addr method of #11, rebased on latest main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@plotnick plotnick mentioned this pull request Aug 13, 2026
Work in progress. Streams already end with an in-band end control; the
receiver no longer demands transport EOF behind it. Every connect and
accept now pairs the stream half with a Done handle, invoked at the
protocol's end of the data with the half handed back; a half dropped
anywhere else is an abort, observed as EOF. The routed adapter returns
completed write halves through Dial::recycle (default: drop) and read
halves to the router's header wait, so a pooling Dial carries stream
after stream over one connection. Native stream types ride bare: no
trait to implement, plain transports pair with Done::discard(). Full
suite, conformance completion probes, and the suite over a pooling TCP
dial all pass, along with every gate leg this box can run (it lacks
cargo-audit, and the wasm leg has not had a full run).
A recovered connection is not usable until the previous stream's
consumer lets it go, and the consumer may be lazy. A pool that hands
the connection out earlier couples the next stream's delivery to that
consumer's progress, which is the serialization the link contract
forbids, and mutual sessions deadlock on the cycle. The router now
writes one byte when it re-arms. A reusing dial consumes it off the
dialing path and reuses only connections whose byte has arrived; a
dial that awaits the byte inline re-creates the coupling at the open.
The multi-thread regression test pins the safe discipline.
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