SignalingServer

interface SignalingServer

An interface representing a signaling server, which provides information about the currently connected peers, as well as ways to create a ReceiveExchange with any of the remote peers from the signaling server.

Properties

Link copied to clipboard
abstract val peers: SharedFlow<Set<Peer>>

A Flow which indicates currently available Peers.

Extensions

Link copied to clipboard
suspend fun SignalingServer.sync(exchange: Exchange<Message.Incoming, Message.Outgoing>, onParticipantsChanged: (Set<PeerIdentifier>) -> Unit = {}): Nothing

Syncs the SendExchange to the peers available in the SignalingServer. The synchronisation process won't terminate, but may be cancelled or throw an exception if the communication channel gets closed.