Add maxRoundTripLatency option#953
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 3a7c08c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
pblazej
pushed a commit
to livekit/client-sdk-swift
that referenced
this pull request
Jun 1, 2026
Exposes a new `maxRoundTripLatency` parameter on `LocalParticipant.performRpc` (via a new `performRpc(destinationIdentity:method:payload:responseTimeout:maxRoundTripLatency:)` overload) so that a caller can configure the amount of time they'd like to be able to tolerate between a RPC request being enqueued and a RPCRequest's ACK comes back from the remote participant. I expect this to be a fairly uncommonly tweaked value, but exposing it means that a client can be configured to tolerate situations where RPC requests are backed up behind other messages due to webrtc head of line blocking on the data channel, and RPC requests are timing out before actually being able to be sent via webrtc. Related android change: livekit/client-sdk-android#953
davidliu
approved these changes
Jun 1, 2026
Contributor
|
Diffuse output: AARJAR |
Merged
This was referenced Jun 2, 2026
1egoman
added a commit
to livekit/rust-sdks
that referenced
this pull request
Jun 3, 2026
Adds a new `max_round_trip_latency` field to `PerformRpcData`, adding similar behavior as was added to the corresponding [swift](livekit/client-sdk-swift#1023) and [android](livekit/client-sdk-android#953) pull requests. Note that this is a **breaking api change**. Per @ladvoc's guidance, this was deemed to be ok because there isn't really a great way to add this new field to the `PerformRpcData` struct in a backwards compatible way. Given this is a breaking change, I opted to break it in a way where if we have to add _more_ fields in here in the future, it could be done in a non breaking way by making `PerformRpcData` use a builder pattern. That results in something that looks like: ```rust let output = caller_room.local_participant().perform_rpc( PerformRpcData::new("identity", "method") // <-- New builder .with_payload("payload") .with_response_timeout(Duration::from_secs(5)) ).await?; ``` --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lukasIO <mail@lukasseiler.de>
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.
Exposes a new
maxRoundTripLatencyparameter onLocalParticipant.performRpcso that a caller can configure the amount of time they'd like to be able to tolerate between a RPC request being enqueued and a RPCRequest's ACK comes back from the remote participant.I expect this to be a fairly uncommonly tweaked value, but exposing it means that a client can be configured to tolerate situations where RPC requests are backed up behind other messages due to webrtc head of line blocking on the data channel, and RPC requests are timing out before actually being able to be sent via webrtc.
Related swift change: livekit/client-sdk-swift#1023