Relay registration
Register a Space with the relay so other devices reach it, and unregister it.
Spaces.relay_register makes a Space reachable from your other devices through the relay; Spaces.relay_unregister stops that. Spaces.relay_unregister_computer takes one of your computers off the relay: its Spaces stay on it, detached, unless delete_spaces deletes them first.
Relay registration#
Methods of Spaces.
Spaces.relay_register#
Publishes space on the cua.ai relay as a machine of the signed-in
account, the way cua host setup publishes this computer: the
Space's own driver dials out, so the account's other devices (a
phone off this network) reach it as relay:<machine>, and nobody
else until it is shared. Idempotent.
async def relay_register(self, space: str) -> SpaceRelayRegistration| Parameter | Type | Default |
|---|---|---|
space | String | required |
Returns SpaceRelayRegistration · Async · Raises CuaError
Spaces.relay_unregister#
Takes space off the relay (its driver leaves; every share goes).
Returns false when it was not on the relay.
async def relay_unregister(self, space: str) -> bool| Parameter | Type | Default |
|---|---|---|
space | String | required |
Returns bool · Async · Raises CuaError
Spaces.relay_unregister_computer#
Spaces.relay_unregister for one of your computers
(relay:<machine>), choosing what happens to the Spaces it
provides: with delete_spaces false they stay on the account,
detached (they come back when the computer registers again); with
true they are deleted too, files first (through the computer while
it answers), then their records. Returns false when it was not on
the relay.
async def relay_unregister_computer(self, space: str, delete_spaces: bool) -> bool| Parameter | Type | Default |
|---|---|---|
space | String | required |
delete_spaces | bool | required |
Returns bool · Async · Raises CuaError
SpaceRelayRegistration record#
A Space published on the relay (Spaces.relay_register).
Returned by Spaces.relay_register.
| Field | Type | Default | Description |
|---|---|---|---|
space | String | The Space. | |
relay_space / relaySpace | String | How the account's other devices reach it: relay:<machine>. | |
machine | String | The relay machine id. | |
url | String | The relay URL of the machine. | |
online | bool | Connected to the relay now. |