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.

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
ParameterTypeDefault
spaceStringrequired

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
ParameterTypeDefault
spaceStringrequired

Returns bool · Async · Raises CuaError

SpaceRelayRegistration record#

A Space published on the relay (Spaces.relay_register).

Returned by Spaces.relay_register.

FieldTypeDefaultDescription
spaceStringThe Space.
relay_space / relaySpaceStringHow the account's other devices reach it: relay:<machine>.
machineStringThe relay machine id.
urlStringThe relay URL of the machine.
onlineboolConnected to the relay now.