setValue

suspend fun setValue(key: String, value: String?)

Sets a value for the given key.

Parameters

key

the key to write

value

the value to store, at most 1024 bytes of UTF-8, or null to clear the key

Throws

3035 / 3065 outside the room, 3072 over 1024 UTF-8 bytes, 4045 when the server refuses, 3079 on timeout. 3035, 4045 and 3079 also reach RoomEventListener.onError