performRpc

open suspend override fun performRpc(destinationIdentity: Participant.Identity, method: String, payload: String, responseTimeout: Duration, maxRoundTripLatency: Duration): String

Initiate an RPC call to a remote participant

Return

The response payload.

Parameters

destinationIdentity

The identity of the destination participant.

method

The method name to call.

payload

The payload to pass to the method.

responseTimeout

Timeout for receiving a response after initial connection. If a value less than 8s is provided, it will be automatically clamped to 8s to ensure sufficient time for round-trip latency buffering. Defaults to 15 seconds.

maxRoundTripLatency

The maximum amount of time it should ever take for an RPC request to reach the destination and for the ACK to come back. Defaults to 7 seconds to account for various relay timeouts and retries in LiveKit Cloud that occur in rare cases. Most callers should not need to change this.

Throws

on failure. Details in RpcError.message.