Use RPC to execute custom methods on other participants in the room and await a response.
More...
Use RPC to execute custom methods on other participants in the room and await a response.
For more information about this feature, see the LiveKit documentation.
◆ LIVEKIT_RPC_MAX_PAYLOAD_BYTES
#define LIVEKIT_RPC_MAX_PAYLOAD_BYTES 15360 |
Maximum payload size for RPC messages.
◆ livekit_rpc_handler_t
Handler for an RPC invocation.
◆ livekit_room_rpc_register()
Registers a handler for an RPC method.
Once registered, the method can be invoked by remote participants in the room.
- Parameters
-
handle[in] | Room handle. |
method[in] | Name of the method to register. |
handler[in] | Handler function to call when the method is invoked by a remote participant. |
- Exceptions
-
If | a handler for the method is already registered, an error is returned. |
- Returns
- LIVEKIT_ERR_NONE if successful, otherwise an error code.
◆ livekit_room_rpc_unregister()
Unregisters a handler for an RPC method.
- Parameters
-
handle[in] | Room handle. |
method[in] | Name of the method to unregister. |
- Returns
- LIVEKIT_ERR_NONE if successful, otherwise an error code.