Skip to content

refactor: Remove specialized 0rtt rpc calls#92

Open
rklaehn wants to merge 3 commits intomainfrom
remove-specialized-0rtt
Open

refactor: Remove specialized 0rtt rpc calls#92
rklaehn wants to merge 3 commits intomainfrom
remove-specialized-0rtt

Conversation

@rklaehn
Copy link
Collaborator

@rklaehn rklaehn commented Feb 12, 2026

Actually, they are not yet removed but just marked as deprecated.

You can now just call the normal ones, and they will work for 0rtt connections as well. This has no measurable overhead. See benchmarks below.

We also rename the somewhat internal fn zero_rtt_accepted in RemoteConnection to zero_rtt_rejected. This is so the code reads nicer for the case where there isn't any 0rtt to begin with.

This is a pretty obscure part of the API, but nevertheless is a breaking change.

if zero_rtt_rejected {
  // resend
}

This branch:

Remote bench
RPC seq 15_590 rps
RPC par 80_014 rps

main:

Remote bench
RPC seq 15_596 rps
RPC par 79_363 rps

…ants

The normal variants can now be used both with and without 0rtt.

Also update example.
@rklaehn rklaehn force-pushed the remove-specialized-0rtt branch from 36692d3 to e44112a Compare February 12, 2026 14:23
@rklaehn rklaehn requested a review from Frando February 12, 2026 14:28
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