Repository navigation
feat(rtc): add PrewarmedConnection - #937
Closed
cnderrauber wants to merge 1 commit into
Closed
cnderrauber wants to merge 1 commit into
cnderrauber wants to merge 1 commit into
Conversation
Add rtc.PrewarmedConnection (create/alive/close) and RoomOptions.prewarmed_connection to open the signalling TCP/TLS connection ahead of Room.connect, so the connect only performs the WebSocket upgrade. The protos are regenerated from the rust-sdks prewarm branch; the rust-sdks submodule and FFI version still need bumping once livekit-ffi is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
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.
Depends on
livekit-ffirelease that includes it.Before merging, bump the
livekit-rtc/rust-sdkssubmodule and the FFI version, then regenerate the protos. The protos in this PR are already generated from the rust-sdks PR branch.Summary
Exposes the Rust
PrewarmedConnectioninlivekit-rtc: a TCP (+TLS) connection to the server opened ahead ofRoom.connect, so the connect only does the WebSocket upgrade.rtc.PrewarmedConnection.create(url): opens the connection; raisesConnectErroron failure..alive: whether it can still be used (not used or closed, and the server hasn't closed it)..close(): closes it without using it. Garbage collection also closes it.RoomOptions.prewarmed_connection: used by the first signal connect. If it's dead or for another host, connect dials fresh as usual.Connect borrows the FFI handle, so Python keeps owning it and disposes it as normal.
Used by livekit/agents to keep a connection ready in idle job processes.
🤖 Generated with Claude Code