LSL Protocol/Restrained Love Open Relay Group/key/003 draft

STATUS: draft

VERSION: 003

RECOMMENDED WITH: delay,cancel

COMMANDS:

IMPLEMENTATIONS:


!x-key and !x-takeover

!x-key/<session_key> associates the key <session_key> with the current session, where <session_key> is a UUID randomly generated by the controller of the current session. After a session key is set, any other controller can then take the control of this session by sending the command !x-takeover/<session_key>. By "other", it can also mean the same controller after a relog or region restart and thus a different key.

Example

Two controllers on the left:

On the right, R is the relay.

k(C1), k(C2), k(C) are the keys of the controllers and k(R) is the key of the avatar wearing the relay.

  1. C1 -> R: blah,k(R),!x-key/a586c562-bf27-b7db-e36e-822d0a9ba02a
  2. C1 <- R: blah,k(C1),!x-key/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok
  3. C2 -> R: blah,k(R),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a
  4. C2 <- R: blah,k(C2),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok


Requirements

General requirements:

Requirements concerning !x-key:

Requirements concerning !x-takeover:

  • the relay makes the device who issued the command the controller of the session having <uuid> as session key,
  • the relay considers that if that device already was controlling a session, then that session has no controller anymore.

Recommendations

  1. C1 has an open session with R and no key set
  2. C2 sends hijack_session,!x-takeover/00000000-0000-0000-0000-000000000000
  3. Now C2 controls the session that formerly was C1's.
For this reason, it is required that the relay refuses !x-takeover/NULL_KEY, so that the relay implementation can initialize session keys to NULL_KEY by default (which we recommend).

(DEPRECATED) !x-noping / !x-nopingclear

These commands are deprecated, use !x-delay and !x-delay/clear instead.
New RLVR controllers should not use them at all. They can instead send a command like !x-delay/<some_reasonable_amount_of_seconds>/noping|!release if they need to keep the session open for <some_reasonable_amount_of_seconds>, and then !x-delay/clear/noping after !x-takeover.
Relays can either interpret them as they used to mean, or preferably translate them to respectively to !x-delay/<some_long_enough_amount_of_time>/noping and !x-delay/clear/noping if the relay supports delay.

We remind the reader that, like with !x-noping, pings are disabled for a session as long as a delay is running within that session. The obvious advantage over !x-noping is that it forces the controller scriptwriter to think of a reasonable delay after which to release the session is meant to expire if not taken over.

For information, we recall below what !x-noping / !x-nopingclear used to mean:

Motivation

There usually are three ways a relay can end a session:

The command !x-noping disables the latter possibility, so that the session can persist despite the controller disappearing. This would typically happen very often if the controller is a portable HUD.

Combined with !x-key and !x-takeover, !x-ping makes it possible for that portable HUD to recover a RLVR session after its wearer relogs, possibly after a long time offline.

Example

After the following sequence of commands, the user of the controller C if it is a HUD can go offline. The session will persist until the relay safe-words.

1 C -> R: blah,k(R),!x-key/a586c562-bf27-b7db-e36e-822d0a9ba02a
2 C <- R: blah,k(C),!x-key/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok
3 C -> R: blah,k(R),!x-noping
4 C <- R: blah,k(C),!x-noping,ok

k'(C) is the new UUID key of C after the relog. To cancel this setting after a relog:

1 C -> R: blah,k(R),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a
2 C <- R: blah,k'(C),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok
3 C -> R: blah,k(R),!x-noping/clear
4 C <- R: blah,k'(C),!x-noping/clear,ok

To release the victim after a relog:

1 C -> R: blah,k(R),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a
2 C <- R: blah,k'(C),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok
3 C -> R: blah,k(R),!release
4 C <- R: blah,k'(C),!release,ok

To continue with the session after a relog:

1 C -> R: blah,k(R),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a
2 C <- R: blah,k'(C),!x-takeover/a586c562-bf27-b7db-e36e-822d0a9ba02a,ok
3 C -> R: blah,k(R),@xxx=add
4 C <- R: blah,k'(C),@xxx=add,ok

Requirements

Caveat

On relog, the fact there is no ping/pong exchange for a session with !x-noping does not mean the relay should not sit the avatar back to where it was sat if this session had @unsit=n as active behavior. So the key <UUID> of the sit target should still be remembered, and @sit:<UUID>=force be sent a few seconds after relog.