App Control Channel

Build an application protocol on an activated scoped handle

OpenRTC admits and connects peers. Your application still owns command authorization, schemas, acknowledgements, and product side effects.

const devices = await rtc.devices.start({ auth, autoConnect: 'online' });

const unregister = rtc.channels.register({
  id: 'app.control.v1',
  kind: 'control',
  ownership: 'shared',
  peerModel: 'device-first',
  routing: 'stream-envelope',
  readiness: 'settled-peer',
  delivery: 'reliable',
});

Use a versioned envelope with a request ID, command kind, bounded payload, and explicit response. Authorize every received command against application policy; peer connectivity is not product authorization.

Keep the protocol idempotent so retries settle one application action. Use a separate latest-state channel for replaceable observations. On logout or teardown, unregister handlers and close the device handle so the old scope cannot continue receiving commands.