drpcquic: add QUIC transport for drpc using quic-go#63
Draft
eshwarsriramoju wants to merge 15 commits into
Draft
drpcquic: add QUIC transport for drpc using quic-go#63eshwarsriramoju wants to merge 15 commits into
eshwarsriramoju wants to merge 15 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…st harness Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…er transport) mode
…r (ServeMultiplexed), and Dial/Listen/Serve
…r-death, no-log, leak)
Add a QUIC Server type whose Serve(ctx, *Listener) method mirrors (*drpcserver.Server).Serve, so it fits callers that hold a server and call Serve(ctx, lis). The free Serve stays as a wrapper. Add ListenPacket for a caller-owned UDP socket.
The accept loop read each stream's invoke before accepting the next, so a stream slow to send its invoke blocked every later stream on the connection. Split AcceptStream (loop) from the invoke read (per-stream goroutine), isolate per-stream parse errors, and order shutdown Cancel->Close->Wait so a stream stalled mid-invoke can't hang drain.
mapQUICError let context.DeadlineExceeded fall into the net.Error timeout catch-all, wrapping it as ClosedError so ToRPCErr returned Unavailable. Return the bare sentinel before the catch-all; ToRPCErr matches it by value and yields codes.DeadlineExceeded.
…rns nil Mirror ServeOne's TLS peer-info: read the verified chain off the QUIC connection and set drpcctx.PeerConnectionInfo before ServeMultiplexed so handlers (auth) see peer identity. Serve now returns nil on clean stop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ServeMultiplexed in drpcserver for concurrent server-side RPC handling
Includes end-to-end tests (streaming, concurrency, cancellation, server-death, leak detection) and a runnable demo in cmd/quicdemo