TransportRole

sealed interface TransportRole

What role a transport plays. A single fabric may hold several roles at once (Apple Multipeer is WifiDirect + Bluetooth; a Network.framework fabric is Discovery + Data). Sealed so a novel fabric can add a case without editing a closed enum.

Inheritors

Types

Link copied to clipboard
data object Bluetooth : TransportRole

Bluetooth radio link.

Link copied to clipboard
data object Data : TransportRole

Carries application frames once a link is established.

Link copied to clipboard
data object Discovery : TransportRole

Finds peers/sessions (mDNS/Bonjour advertising & browsing).

Link copied to clipboard

Reaches peers by relaying through a server.

Link copied to clipboard
data object WebRtc : TransportRole

WebRTC data channel.

Link copied to clipboard

Peer-to-peer Wi-Fi with no access point (AWDL / Wi-Fi Aware / Wi-Fi Direct).

Link copied to clipboard
data object WifiLan : TransportRole

Wi-Fi via a shared access point — the "same Wi-Fi network" case.